[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    FW: [Linux-ha-dev] Patch for IPaddr.in/Send_Arp testing.
From:       "Soffen, Matthew" <msoffen () iso-ne ! com>
Date:       2001-11-16 17:36:35
[Download RAW message or body]

Alan, were you going to apply these or no ?

Just curious (trying to test and I wanted to make sure I'm in synch).

Trying to track down some bug.  The master process died and the remaining
ones are inactive...

Matt

-----Original Message-----
From: Soffen, Matthew [mailto:msoffen@iso-ne.com]
Sent: Wednesday, November 07, 2001 12:32 PM
To: Linux HA Development List
Subject: [Linux-ha-dev] Patch for IPaddr.in/Send_Arp testing.


This is a patch to have send_arp called with the correct information for
BSD/Solaris

It grabs the correct HW address for Linux vs. *BSD/SunOS.

 <<diff.diff>> 

I also added the HW address to the info line being printed out to the INFO
file.

Unfortunately, BSD doesn't seem to have the support for the protocol:

# send_arp dc0 64.65.195.196 00a0cc34a878 64.65.195.186 00a0cc34a878
socket: Protocol not supported

I'm currently seeing what alternatives exist.  There must be some way to do
this in BSD/Solaris.

Matt Soffen - Web Intranet Developer
http://www.iso-ne.com/

==============================================
Boss  - "My boss says we need some eunuch programmers."
Dilbert- "I think he means UNIX and I already know UNIX."
Boss  - "Well, if the company nurse comes by, tell her I said
             never mind."
                                 - Dilbert -
==============================================



["diff.diff" (application/octet-stream)]

Index: IPaddr.in
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/resource.d/IPaddr.in,v
retrieving revision 1.13
diff -u -r1.13 IPaddr.in
--- IPaddr.in	2001/10/24 20:23:09	1.13
+++ IPaddr.in	2001/11/07 17:01:22
@@ -253,17 +253,23 @@
 
   TARGET_INTERFACE=`echo $IF | sed 's%:.*%%'`
 
-  MACADDR=`$IFCONFIG $TARGET_INTERFACE  | \
-      fgrep $TARGET_INTERFACE | \
-      sed \
-      's/^.*HWaddr \(..\):\(..\):\(..\):\(..\):\(..\):\(..\).*$/\1\2\3\4\5\6/'`
+  case $SYSTYPE in
+    *BSD|SunOS) MACADDR=`$IFCONFIG $TARGET_INTERFACE  | \
+      		fgrep "ether" | \
+      		sed \
+      		's/^.*ether \(..\):\(..\):\(..\):\(..\):\(..\):\(..\).*$/\1\2\3\4\5\6/'`;;
+    *) 		MACADDR=`$IFCONFIG $TARGET_INTERFACE  | \
+      		fgrep $TARGET_INTERFACE | \
+      		sed \
+      		's/^.*HWaddr \(..\):\(..\):\(..\):\(..\):\(..\):\(..\).*$/\1\2\3\4\5\6/'`;;
+  esac
 
   if [ "${MACADDR:=NULL}" = "NULL" ]; then
       ha_log "ERROR: Could not locate obtain hardware address" \
       "for $TARGET_INTERFACE"
   fi
 
-  ha_log "info: Sending Gratuitous Arp for $BASEIP on $IF [$TARGET_INTERFACE]"
+  ha_log "info: Sending Gratuitous Arp for $BASEIP on $IF [$TARGET_INTERFACE] $MACADDR"
 
   for j in 1 2 3 4 5
   do

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.community.tummy.com
http://lists.community.tummy.com/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic