Bug 127284 - add option rwhod -n to prevent broadcast to selected interface
Summary: add option rwhod -n to prevent broadcast to selected interface
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rwho
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-07-05 23:08 UTC by Alois Treindl
Modified: 2015-03-05 01:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-19 15:33:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alois Treindl 2004-07-05 23:08:49 UTC
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;

Comment 1 Suzanne Hillman 2004-07-13 21:16:30 UTC
Internal RFE bug #127788 entered.

Comment 6 Suzanne Hillman 2004-08-19 15:33:30 UTC
There is insufficient business justification for making this change.
Suggest submitting upstream.


Note You need to log in before you can comment on or make changes to this bug.