Summary: | [regression] 9.1-PRERELEASE host cannot talk to itself over IPv6 (except on loopback) | ||
---|---|---|---|
Product: | Base System | Reporter: | Mike Andrews <mandrews> |
Component: | kern | Assignee: | George V. Neville-Neil <gnn> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | gonzo |
Priority: | Normal | ||
Version: | 9.1-PRERELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
Mike Andrews
2012-07-22 19:50:03 UTC
Responsible Changed From-To: freebsd-bugs->freebsd-net change synopsis and assign Responsible Changed From-To: freebsd-net->bz Claim. I am working on the bugfix. Hi, unless you are using a cxgb or cxgbe card, the work around temporary is to do: ifconfig lo0 -rxcsum6 -txcsum6 I am working on a proper fix. -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. Workaround works, thanks :) Author: bz Date: Sat Jul 28 20:31:39 2012 New Revision: 238871 URL: http://svn.freebsd.org/changeset/base/238871 Log: Hardcode the loopback rx/tx checkum options for IPv6 to on without checking. This allows the FreeBSD 9.1 release process to move forward. Work around the problem that loopback connections to local addresses not on loopback interfaces and not on interfaces w/ IPv6 checksum offloading enabled would not work. A proper fix to allow us to disable the "checksum offload" on loopback for testing, measurements, ... as we allow for IPv4 needs to put in place later. Reported by: tuexen, Matthew Seaman (m.seaman infracaninophile.co.uk) Reported by: Mike Andrews (mandrews bit0.com), kib, ... PR: kern/170070 MFC after: 1 day X-MFC after: re approval Modified: head/sys/net/if_loop.c Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Sat Jul 28 20:08:14 2012 (r238870) +++ head/sys/net/if_loop.c Sat Jul 28 20:31:39 2012 (r238871) @@ -257,10 +257,20 @@ looutput(struct ifnet *ifp, struct mbuf m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES; break; case AF_INET6: +#if 0 + /* + * XXX-BZ for now always claim the checksum is good despite + * any interface flags. This is a workaround for 9.1-R and + * a proper solution ought to be sought later. + */ if (ifp->if_capenable & IFCAP_RXCSUM_IPV6) { m->m_pkthdr.csum_data = 0xffff; m->m_pkthdr.csum_flags = LO_CSUM_SET; } +#else + m->m_pkthdr.csum_data = 0xffff; + m->m_pkthdr.csum_flags = LO_CSUM_SET; +#endif m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES6; break; case AF_IPX: @@ -446,15 +456,29 @@ loioctl(struct ifnet *ifp, u_long cmd, c ifp->if_capenable ^= IFCAP_RXCSUM; if ((mask & IFCAP_TXCSUM) != 0) ifp->if_capenable ^= IFCAP_TXCSUM; - if ((mask & IFCAP_RXCSUM_IPV6) != 0) + if ((mask & IFCAP_RXCSUM_IPV6) != 0) { +#if 0 ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; - if ((mask & IFCAP_TXCSUM_IPV6) != 0) +#else + error = EOPNOTSUPP; + break; +#endif + } + if ((mask & IFCAP_TXCSUM_IPV6) != 0) { +#if 0 ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; +#else + error = EOPNOTSUPP; + break; +#endif + } ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist = LO_CSUM_FEATURES; +#if 0 if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) ifp->if_hwassist |= LO_CSUM_FEATURES6; +#endif break; default: _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" Hi, I have committed a workaround for the problem to HEAD. You can find the patch to apply to stable/9 here: http://people.freebsd.org/~bz/20120728-02.diff In case someone from re@ wants to approve it; please just reply to me. Everyone else at least CC: me and re. In case you have previously applied the -rxcsum6 -txcsum6 workaround you need to remove the from your startup script before rebooting! PLease test as soon as you can as we'll merge it to stable/9 for 9.1-RC1 almost instantly most likely and it would be good to know if it works for you as well. Thanks a lot and dorry for the problems, /bz PS: this most likely does not yet fix the AH issue. I'll be on that in a minute but that's for after -RC1 unless RC1 will be further delayed due to me:( -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. MFC r238871: Hardcode the loopback rx/tx checkum options for IPv6 to on without checking. This allows the FreeBSD 9.1 release process to move forward. Work around the problem that loopback connections to local addresses not on loopback interfaces and not on interfaces w/ IPv6 checksum offloading enabled would not work. A proper fix to allow us to disable the "checksum offload" on loopback for testing, measurements, ... as we allow for IPv4 needs to put in place later. PR: kern/170070 Index: sys =================================================================== --- sys (revision 238871) +++ sys (working copy) Property changes on: sys ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/sys:r238871 Index: sys/net/if_loop.c =================================================================== --- sys/net/if_loop.c (revision 238871) +++ sys/net/if_loop.c (working copy) @@ -257,10 +257,20 @@ looutput(struct ifnet *ifp, struct mbuf *m, struct m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES; break; case AF_INET6: +#if 0 + /* + * XXX-BZ for now always claim the checksum is good despite + * any interface flags. This is a workaround for 9.1-R and + * a proper solution ought to be sought later. + */ if (ifp->if_capenable & IFCAP_RXCSUM_IPV6) { m->m_pkthdr.csum_data = 0xffff; m->m_pkthdr.csum_flags = LO_CSUM_SET; } +#else + m->m_pkthdr.csum_data = 0xffff; + m->m_pkthdr.csum_flags = LO_CSUM_SET; +#endif m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES6; break; case AF_IPX: @@ -446,15 +456,29 @@ loioctl(struct ifnet *ifp, u_long cmd, caddr_t dat ifp->if_capenable ^= IFCAP_RXCSUM; if ((mask & IFCAP_TXCSUM) != 0) ifp->if_capenable ^= IFCAP_TXCSUM; - if ((mask & IFCAP_RXCSUM_IPV6) != 0) + if ((mask & IFCAP_RXCSUM_IPV6) != 0) { +#if 0 ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; - if ((mask & IFCAP_TXCSUM_IPV6) != 0) +#else + error = EOPNOTSUPP; + break; +#endif + } + if ((mask & IFCAP_TXCSUM_IPV6) != 0) { +#if 0 ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; +#else + error = EOPNOTSUPP; + break; +#endif + } ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist = LO_CSUM_FEATURES; +#if 0 if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) ifp->if_hwassist |= LO_CSUM_FEATURES6; +#endif break; default: On Jul 28, 2012, at 10:41 PM, Bjoern A. Zeeb wrote: > Hi, >=20 > I have committed a workaround for the problem to HEAD. You can find > the patch to apply to stable/9 here: >=20 > http://people.freebsd.org/~bz/20120728-02.diff >=20 > In case someone from re@ wants to approve it; please just reply to me. > Everyone else at least CC: me and re. >=20 > In case you have previously applied the -rxcsum6 -txcsum6 workaround > you need to remove the from your startup script before rebooting! >=20 > PLease test as soon as you can as we'll merge it to stable/9 for > 9.1-RC1 almost instantly most likely and it would be good to know if > it works for you as well. >=20 > Thanks a lot and dorry for the problems, Hi Bjoern, I did some SCTP testing and this fix works for me... Best regards Michael > /bz >=20 >=20 > PS: this most likely does not yet fix the AH issue. I'll be on that > in a minute but that's for after -RC1 unless RC1 will be further > delayed due to me:( >=20 > --=20 > Bjoern A. Zeeb You have to have = visions! > Stop bit received. Insert coin for new address family. >=20 >=20 > MFC r238871: >=20 > Hardcode the loopback rx/tx checkum options for IPv6 to on without > checking. This allows the FreeBSD 9.1 release process to move = forward. > Work around the problem that loopback connections to local addresses > not on loopback interfaces and not on interfaces w/ IPv6 checksum = offloading > enabled would not work. > A proper fix to allow us to disable the "checksum offload" on = loopback > for testing, measurements, ... as we allow for IPv4 needs to put in > place later. >=20 > PR: kern/170070 >=20 > Index: sys > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys (revision 238871) > +++ sys (working copy) >=20 > Property changes on: sys > ___________________________________________________________________ > Modified: svn:mergeinfo > Merged /head/sys:r238871 > Index: sys/net/if_loop.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/net/if_loop.c (revision 238871) > +++ sys/net/if_loop.c (working copy) > @@ -257,10 +257,20 @@ looutput(struct ifnet *ifp, struct mbuf *m, = struct > m->m_pkthdr.csum_flags &=3D ~LO_CSUM_FEATURES; > break; > case AF_INET6: > +#if 0 > + /* > + * XXX-BZ for now always claim the checksum is good = despite > + * any interface flags. This is a workaround for 9.1-R = and > + * a proper solution ought to be sought later. > + */ > if (ifp->if_capenable & IFCAP_RXCSUM_IPV6) { > m->m_pkthdr.csum_data =3D 0xffff; > m->m_pkthdr.csum_flags =3D LO_CSUM_SET; > } > +#else > + m->m_pkthdr.csum_data =3D 0xffff; > + m->m_pkthdr.csum_flags =3D LO_CSUM_SET; > +#endif > m->m_pkthdr.csum_flags &=3D ~LO_CSUM_FEATURES6; > break; > case AF_IPX: > @@ -446,15 +456,29 @@ loioctl(struct ifnet *ifp, u_long cmd, caddr_t = dat > ifp->if_capenable ^=3D IFCAP_RXCSUM; > if ((mask & IFCAP_TXCSUM) !=3D 0) > ifp->if_capenable ^=3D IFCAP_TXCSUM; > - if ((mask & IFCAP_RXCSUM_IPV6) !=3D 0) > + if ((mask & IFCAP_RXCSUM_IPV6) !=3D 0) { > +#if 0 > ifp->if_capenable ^=3D IFCAP_RXCSUM_IPV6; > - if ((mask & IFCAP_TXCSUM_IPV6) !=3D 0) > +#else > + error =3D EOPNOTSUPP; > + break; > +#endif > + } > + if ((mask & IFCAP_TXCSUM_IPV6) !=3D 0) { > +#if 0 > ifp->if_capenable ^=3D IFCAP_TXCSUM_IPV6; > +#else > + error =3D EOPNOTSUPP; > + break; > +#endif > + } > ifp->if_hwassist =3D 0; > if (ifp->if_capenable & IFCAP_TXCSUM) > ifp->if_hwassist =3D LO_CSUM_FEATURES; > +#if 0 > if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) > ifp->if_hwassist |=3D LO_CSUM_FEATURES6; > +#endif > break; >=20 > default: >=20 Author: bz Date: Sat Jul 28 23:11:09 2012 New Revision: 238876 URL: http://svn.freebsd.org/changeset/base/238876 Log: MFC r238871: Hardcode the loopback rx/tx checkum options for IPv6 to on without checking. This allows the FreeBSD 9.1 release process to move forward. Work around the problem that loopback connections to local addresses not on loopback interfaces and not on interfaces w/ IPv6 checksum offloading enabled would not work. A proper fix to allow us to disable the "checksum offload" on loopback for testing, measurements, ... as we allow for IPv4 needs to put in place later. PR: kern/170070 Approved by: re (kib) Modified: stable/9/sys/net/if_loop.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/net/if_loop.c ============================================================================== --- stable/9/sys/net/if_loop.c Sat Jul 28 22:42:52 2012 (r238875) +++ stable/9/sys/net/if_loop.c Sat Jul 28 23:11:09 2012 (r238876) @@ -257,10 +257,20 @@ looutput(struct ifnet *ifp, struct mbuf m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES; break; case AF_INET6: +#if 0 + /* + * XXX-BZ for now always claim the checksum is good despite + * any interface flags. This is a workaround for 9.1-R and + * a proper solution ought to be sought later. + */ if (ifp->if_capenable & IFCAP_RXCSUM_IPV6) { m->m_pkthdr.csum_data = 0xffff; m->m_pkthdr.csum_flags = LO_CSUM_SET; } +#else + m->m_pkthdr.csum_data = 0xffff; + m->m_pkthdr.csum_flags = LO_CSUM_SET; +#endif m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES6; break; case AF_IPX: @@ -446,15 +456,29 @@ loioctl(struct ifnet *ifp, u_long cmd, c ifp->if_capenable ^= IFCAP_RXCSUM; if ((mask & IFCAP_TXCSUM) != 0) ifp->if_capenable ^= IFCAP_TXCSUM; - if ((mask & IFCAP_RXCSUM_IPV6) != 0) + if ((mask & IFCAP_RXCSUM_IPV6) != 0) { +#if 0 ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; - if ((mask & IFCAP_TXCSUM_IPV6) != 0) +#else + error = EOPNOTSUPP; + break; +#endif + } + if ((mask & IFCAP_TXCSUM_IPV6) != 0) { +#if 0 ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; +#else + error = EOPNOTSUPP; + break; +#endif + } ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist = LO_CSUM_FEATURES; +#if 0 if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) ifp->if_hwassist |= LO_CSUM_FEATURES6; +#endif break; default: _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" On 7/28/2012 4:41 PM, Bjoern A. Zeeb wrote: > Hi, > > I have committed a workaround for the problem to HEAD. You can find > the patch to apply to stable/9 here: > > http://people.freebsd.org/~bz/20120728-02.diff > > In case someone from re@ wants to approve it; please just reply to me. > Everyone else at least CC: me and re. > > In case you have previously applied the -rxcsum6 -txcsum6 workaround > you need to remove the from your startup script before rebooting! > > PLease test as soon as you can as we'll merge it to stable/9 for > 9.1-RC1 almost instantly most likely and it would be good to know if > it works for you as well. > > Thanks a lot and dorry for the problems, > /bz Since I saw a commit to stable/9 I went ahead and updated and tried it, and it seems to work for me. State Changed From-To: open->suspended The workaround has been merged; thanks a lto for reporting and testing; I leave the PR in suspended to not forget to cleanly fix it eventually. Responsible Changed From-To: bz->gnn I shall not use bugzilla (at least until we will have a CLI). batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed. From my perspective (as the original submitter) yes, I'd consider it closed for years. Some of the other commenters hinted that they wanted to apply a better fix later. Not sure if that ever happened in the last six years; you'd have to ask them. There was a commit referencing this bug, but it's still not closed and has been inactive for some time. Closing as fixed. Please re-open it if the issue hasn't been completely resolved. |