PERFORCE change 154385 for review
Qing Li
qingli at FreeBSD.org
Mon Dec 8 22:22:09 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=154385
Change 154385 by qingli at FreeBSD-newarp on 2008/12/09 06:21:32
fixed loopback issue
unit test: ping 127.0.0.1
telnet 127.0.0.1
telnet -6 fe80::20f:1fff:fexx:xxxx%bge0
Affected files ...
.. //depot/projects/arp-v2/src/sys/net/if_ethersubr.c#6 edit
Differences ...
==== //depot/projects/arp-v2/src/sys/net/if_ethersubr.c#6 (text+ko) ====
@@ -287,8 +287,16 @@
senderr(EAFNOSUPPORT);
}
- if (lle && (lle->la_flags & LLE_IFADDR) && useloopback)
+ if (lle && (lle->la_flags & LLE_IFADDR) && useloopback) {
+ int csum_flags = 0;
+ if (m->m_pkthdr.csum_flags & CSUM_IP)
+ csum_flags |= (CSUM_IP_CHECKED|CSUM_IP_VALID);
+ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA)
+ csum_flags |= (CSUM_DATA_VALID|CSUM_PSEUDO_HDR);
+ m->m_pkthdr.csum_flags |= csum_flags;
+ m->m_pkthdr.csum_data = 0xffff;
return (if_simloop(ifp, m, dst->sa_family, 0));
+ }
/*
* Add local net header. If no space in first mbuf,
More information about the p4-projects
mailing list