Correct test for fragmented packet.

This commit is contained in:
Jeffrey Hsu 2006-05-11 00:53:43 +00:00
parent 01e0ffbae8
commit a393a28afa

View File

@ -294,7 +294,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
* RFC2004 specifies that fragmented diagrams shouldn't
* be encapsulated.
*/
if ((ip->ip_off & IP_MF) != 0) {
if (ip->ip_off & (IP_MF | IP_OFFMASK)) {
_IF_DROP(&ifp->if_snd);
m_freem(m);
error = EINVAL; /* is there better errno? */