Fix EtherIP. TOS field must be initialized when the inner protocol is
PF_LINK, and multicast/broadcast flag should always be dropped because the outer protocol uses unicast even when the inner address is not for unicast. It had been broken since r236951 when gif_output() started to use IFQ_HANDOFF().
This commit is contained in:
parent
4bace8e721
commit
9be09a6e43
@ -170,6 +170,7 @@ in_gif_output(struct ifnet *ifp, int family, struct mbuf *m)
|
||||
return ENOBUFS;
|
||||
bcopy(&eiphdr, mtod(m, struct etherip_header *),
|
||||
sizeof(struct etherip_header));
|
||||
tos = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -257,6 +258,7 @@ in_gif_output(struct ifnet *ifp, int family, struct mbuf *m)
|
||||
#endif
|
||||
}
|
||||
|
||||
m->m_flags &= ~(M_BCAST|M_MCAST);
|
||||
error = ip_output(m, NULL, &sc->gif_ro, 0, NULL, NULL);
|
||||
|
||||
if (!(GIF2IFP(sc)->if_flags & IFF_LINK0) &&
|
||||
|
@ -176,6 +176,7 @@ in6_gif_output(struct ifnet *ifp,
|
||||
return ENOBUFS;
|
||||
bcopy(&eiphdr, mtod(m, struct etherip_header *),
|
||||
sizeof(struct etherip_header));
|
||||
itos = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -266,6 +267,7 @@ in6_gif_output(struct ifnet *ifp,
|
||||
#endif
|
||||
}
|
||||
|
||||
m->m_flags &= ~(M_BCAST|M_MCAST);
|
||||
#ifdef IPV6_MINMTU
|
||||
/*
|
||||
* force fragmentation to minimum MTU, to avoid path MTU discovery.
|
||||
|
Loading…
Reference in New Issue
Block a user