-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi guys! On 18/02/10 22:45, JuanJo Ciarlante wrote: > On Wed, Feb 17, 2010 at 6:46 PM, JuanJo Ciarlante <jjo...@google.com> wrote: > >> I still need to do some touches for allmerged, as >> we conflict w/ Gert's IPv6 patch on a mroute.c chunk >> IIRC. >
Even though I know you both have told me that there would be a merge conflict in mroute.c, I decided to put it on the mailing list - hopefully to get an open discussion about it! I've attached the merge conflict. It would be great if you could sort this out soon. Then I'll get both of your trees into the allmerged branch ASAP. Right now only Gert's code is in the allmerged branch. What I do see might be a challenge (without knowing the code in details), is that JJO's code is using #ifdef, while Gert's code is not. With a conflict in mroute_addr_print_ex(), which includes an #ifdef I see a potential disaster here. Personally, I would like to evaluate Gert's patches to see if they could be #ifdef'ed. Then both IPv6 branches can both use USE_PF_INET6 to enable or disable the IPv6 support. I have not studied these patches, so I don't know how doable that is. And this is my personal opinion, I don't mean to instruct anyone into a direction. I will let you guys find the proper direction. kind regards, David Sommerseth -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAkt+caIACgkQDC186MBRfrr5ZACgqLxiXN70pCOGY0zyvQGSCpo6 n2EAn1le6hzZe4aThLfAKvYwK7d3CPSG =e7yX -----END PGP SIGNATURE-----
diff --cc mroute.c index b7e3e9c,bba889d..0000000 --- a/mroute.c +++ b/mroute.c @@@ -399,24 -359,47 +421,68 @@@ mroute_addr_print_ex (const struct mrou } break; case MR_ADDR_IPV6: ++<<<<<<< HEAD + { + buf_printf (&out, "%s", + print_in6_addr( *(struct in6_addr*)&maddr.addr, 0, gc)); + if (maddr.type & MR_WITH_NETBITS) + { + buf_printf (&out, "/%d", maddr.netbits); + } + } + break; + default: + buf_printf (&out, "UNKNOWN"); + break; + } + return BSTR (&out); + } + else + return "[NULL]"; + } ++======= + #ifdef USE_PF_INET6 + { + struct buffer buf; + struct sockaddr_in6 sin6; + int port; + char buf6[INET6_ADDRSTRLEN] = ""; + CLEAR(sin6); + sin6.sin6_family = AF_INET6; + buf_set_read (&buf, maddr.addr, maddr.len); + if (buf_read(&buf, &sin6.sin6_addr, sizeof (sin6.sin6_addr))) + { + if (getnameinfo((struct sockaddr *)&sin6, sizeof (struct sockaddr_in6), + buf6, sizeof (buf6), NULL, 0, NI_NUMERICHOST) != 0) + { + buf_printf (&out, "MR_ADDR_IPV6 getnameinfo() err"); + break; + } + buf_puts (&out, buf6); + if (maddr.type & MR_WITH_NETBITS) + buf_printf (&out, "/%d", maddr.netbits); + if (maddr.type & MR_WITH_PORT) + { + port = buf_read_u16 (&buf); + if (port >= 0) + buf_printf (&out, ":%d", port); + } + } + } + #else /* old, pre USE_PF_INET6 code */ + buf_printf (&out, "IPV6"); + #endif + break; + default: + buf_printf (&out, "UNKNOWN"); + break; + } + return BSTR (&out); + } + else + return "[NULL]"; + } ++>>>>>>> feat_ipv6_transport /* * mroute_helper's main job is keeping track of