version 1.154, 2018/05/01 07:21:39 |
version 1.155, 2018/05/17 12:07:48 |
Line 392 nd6_ns_output(struct ifnet *ifp, const s |
|
Line 392 nd6_ns_output(struct ifnet *ifp, const s |
|
/* estimate the size of message */ |
/* estimate the size of message */ |
maxlen = sizeof(*ip6) + sizeof(*nd_ns); |
maxlen = sizeof(*ip6) + sizeof(*nd_ns); |
maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; |
maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; |
KASSERTMSG(max_linkhdr + maxlen < MCLBYTES, |
KASSERTMSG(max_linkhdr + maxlen <= MCLBYTES, |
"max_linkhdr + maxlen >= MCLBYTES (%d + %d >= %d)", |
"max_linkhdr + maxlen > MCLBYTES (%d + %d > %d)", |
max_linkhdr, maxlen, MCLBYTES); |
max_linkhdr, maxlen, MCLBYTES); |
|
|
MGETHDR(m, M_DONTWAIT, MT_DATA); |
MGETHDR(m, M_DONTWAIT, MT_DATA); |
|
|
/* estimate the size of message */ |
/* estimate the size of message */ |
maxlen = sizeof(*ip6) + sizeof(*nd_na); |
maxlen = sizeof(*ip6) + sizeof(*nd_na); |
maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; |
maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; |
KASSERTMSG(max_linkhdr + maxlen < MCLBYTES, |
KASSERTMSG(max_linkhdr + maxlen <= MCLBYTES, |
"max_linkhdr + maxlen >= MCLBYTES (%d + %d >= %d)", |
"max_linkhdr + maxlen > MCLBYTES (%d + %d > %d)", |
max_linkhdr, maxlen, MCLBYTES); |
max_linkhdr, maxlen, MCLBYTES); |
|
|
MGETHDR(m, M_DONTWAIT, MT_DATA); |
MGETHDR(m, M_DONTWAIT, MT_DATA); |