IPaddr2: support IPoIB gratuitous arps

This patch allows the configuration of a heartbeat based NFS export of
CXFS clients on a cluster using NFS/IPoIB.

It sends gratuitous arps usin IPoIB by using ipoibarping instead of
send_arp, which relies on libnet and doesn't know IB.

Signed-off-by: Ivan Rayner <[EMAIL PROTECTED]>
Signed-off-by: Anibal Monsalve Salazar <[EMAIL PROTECTED]>

diff -u resources/OCF/IPaddr2 resources/OCF/IPaddr2
--- resources/OCF/IPaddr2       2008-01-15 21:17:35.000000000 +1100
+++ resources/OCF/IPaddr2       2008-08-15 14:08:12.330442560 +1000
@@ -513,6 +513,29 @@
        esac
 }
 
+#
+# Run ipoibarping to note peers about new Infiniband address
+#
+run_send_ib_arp() {
+       SENDIBARP="/sbin/ipoibarping"
+
+       if [ ! -x $SENDIBARP ] ; then
+               ocf_log err "Could not send gratuitous Infiniband arps: file 
not found: $SENDIBPARP"
+               return
+       fi
+
+       ARGS="-q -c  $ARP_REPEAT -U -I $NIC $BASEIP"
+       ocf_log info "$SENDIBARP $ARGS"
+       case $ARP_BACKGROUND in
+       yes)
+               ($SENDIBARP $ARGS || ocf_log err "Could not send gratuitous 
arps" &) >&2
+               ;;
+       *)
+               $SENDIBARP $ARGS || ocf_log err "Could not send gratuitous arps"
+               ;;
+       esac
+}
+
 # Do we already serve this IP address?
 #
 # returns:
@@ -622,6 +645,9 @@
        lo*)
                : no need to run send_arp on loopback
                ;;
+       ib*)
+               run_send_ib_arp
+               ;;
        *)
                run_send_arp
                ;;
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to