From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116 Description of problem: rwhod sends broadcasts to all interfaces on a machine. In a Linux LVS (load balanced server cluster) I am running, the rwhod broadcasts on the external interface were undesired. They create unwanted ICMP error replies from some devices (DELL RAC cards). Only rwho broadcasts to the internal cluster network were desired. If iptables filtering of rwhod broadcasts are used to filter outgoing rwho broadcasts, then rwhod itself complains (every 3 minutes) to syslog: rwhod[2215]: sendto(BROADCAST_ADDRESS): Operation not permitted I added a patch to rwhod.c which gives it an additionla option: rwhod -n eth1 prevents broadcasts to interface eth1. My simple implmentation allows only one such option, no list of interfaces. Version-Release number of selected component (if applicable): rwho-0.17-18 How reproducible: Always Steps to Reproduce: 1.it is not a bug, but a new feature 2. 3. Actual Results: feature works: rwhod -n eth1 does not broadcast on eth1 Additional info: here is the patch: --- netkit-rwho-0.17/rwhod/rwhod.c +++ netkit-rwho-0.17.modified/rwhod/rwhod.c @@ -118,6 +118,7 @@ static int use_broadcast = 0; static int need_init = 1; static int child_pid = 0; +static char *ifname_nb = NULL; /* name of no-broadcast interface */ #define WHDRSIZE (((caddr_t) &((struct whod *) 0)->wd_we) \ - ((caddr_t) 0)) @@ -143,7 +144,7 @@ exit(1); } - while ((opt = getopt(argc, argv, "bpau:")) != EOF) { + while ((opt = getopt(argc, argv, "bpaun:")) != EOF) { switch (opt) { case 'b': use_broadcast = 1; @@ -158,6 +159,9 @@ case 'u': user = optarg; break; + case 'n': + ifname_nb = optarg; + break; case '?': default: fprintf(stderr, "usage: rwhod [-bpa] [-u user]\n"); @@ -609,6 +613,9 @@ if (np != NULL) continue; ifreq = *ifr; + if (ifname_nb != NULL && strcmp(ifname_nb, ifr->ifr_name) == 0){ + continue; + } np = (struct neighbor *)malloc(sizeof (*np)); if (np == NULL) continue;
Internal RFE bug #127788 entered.
There is insufficient business justification for making this change. Suggest submitting upstream.