FreeBSD Bugzilla – Attachment 15728 Details for
Bug 29071
relay patch for rwhod
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.26 KB, created by
Scott Hazen Mueller
on 2001-07-19 01:00:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Scott Hazen Mueller
Created:
2001-07-19 01:00:02 UTC
Size:
1.26 KB
patch
obsolete
>*** rwhod.c Wed Jul 18 16:32:56 2001 >--- rwhod.c.relay Wed Jul 18 16:28:57 2001 >*************** >*** 122,127 **** >--- 122,128 ---- > int multicast_mode = NO_MULTICAST; > int multicast_scope; > struct sockaddr_in multicast_addr = { sizeof multicast_addr, AF_INET }; >+ int mode_relay = 0; > > /* > * Alarm interval. Don't forget to change the down time check in ruptime >*************** >*** 179,184 **** >--- 180,186 ---- > struct sockaddr_in sin; > uid_t unpriv_uid; > gid_t unpriv_gid; >+ struct neighbor *np; > > if (getuid()) > errx(1, "not super user"); >*************** >*** 204,209 **** >--- 206,213 ---- > quiet_mode = 1; > else if (strcmp(*argv, "-p") == 0) > iff_flag = 0; >+ else if (strcmp(*argv, "-r") == 0) >+ mode_relay = 1; > else > usage(); > argv++, argc--; >*************** >*** 296,301 **** >--- 300,311 ---- > inet_ntoa(from.sin_addr)); > continue; > } >+ if ( mode_relay && ( wd.wd_hostname != myname ) && ( wd.wd_pad[1] != 'X' ) ) { >+ wd.wd_pad[1] = 'X'; >+ for (np = neighbors; np != NULL; np = np->n_next) >+ (void) sendto(s, (char *)&wd, cc, 0, >+ np->n_addr, np->n_addrlen); >+ } > (void) snprintf(path, sizeof path, "whod.%s", wd.wd_hostname); > /* > * Rather than truncating and growing the file each time,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 29071
: 15728