[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] GRE Stateless IP Tunnel Patch



Below is a patch for AIS to allow binding to a GRE stateless tunnel.

This patch has been tested and functions as it should.

For this to work a multicast router software package must also be used.  For testing mrouted was used.

This is from our lead developer Jim Leu (jleu inoc com) I didn't want to take credit for his work:

cat openais-0.80.3-ptp.patch


diff -uNr openais-0.80.3/exec/totemip.c openais-0.80.3-jleu/exec/totemip.c
--- openais-0.80.3/exec/totemip.c 2007-06-24 02:33:09.000000000 -0400
+++ openais-0.80.3-jleu/exec/totemip.c 2008-05-08 18:33:21.000000000 -0400
@@ -502,6 +502,15 @@
parse_rtattr(tb, IFA_MAX, IFA_RTA(ifa), len);

memcpy(ipaddr.addr, RTA_DATA(tb[IFA_ADDRESS]), TOTEMIP_ADDRLEN);
+ /*
+  * For a ptp line IFA_ADDRESS is remote and IFA_LOCAL is local
+  * Thus for ptp IFA_ADDRESS != IFA_LOCAL.
+  * For broadcast links IFA_ADDRESS == IFA_LOCAL.
+  */
+ if (memcmp(RTA_DATA(tb[IFA_LOCAL]), RTA_DATA(tb[IFA_ADDRESS]), TOTEMIP_ADDRLEN)) {
+ memcpy(ipaddr.addr, RTA_DATA(tb[IFA_LOCAL]), TOTEMIP_ADDRLEN);
+ }
+
if (totemip_equal(&ipaddr, bindnet)) {
found_if = 1;
}



Thanks,

Doug Smith


--
Doug Smith
System Administrator
INOC
608.663.4555 ext. 202
608.663.4558 fax

*** DELIVERING UPTIME ***




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]