diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-26 23:17:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-26 23:17:56 -0400 |
commit | 228428428138e231a155464239880201e5cc8b44 (patch) | |
tree | 89b437f5501d03ca36b717e232337426d0de77ca /net/ipv6/mip6.c | |
parent | 78681ac08a611313595d13cafabae1183b71ef48 (diff) | |
parent | 6c3b8fc618905d7599dcc514c99ce4293d476f39 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
netns: fix ip_rt_frag_needed rt_is_expired
netfilter: nf_conntrack_extend: avoid unnecessary "ct->ext" dereferences
netfilter: fix double-free and use-after free
netfilter: arptables in netns for real
netfilter: ip{,6}tables_security: fix future section mismatch
selinux: use nf_register_hooks()
netfilter: ebtables: use nf_register_hooks()
Revert "pkt_sched: sch_sfq: dump a real number of flows"
qeth: use dev->ml_priv instead of dev->priv
syncookies: Make sure ECN is disabled
net: drop unused BUG_TRAP()
net: convert BUG_TRAP to generic WARN_ON
drivers/net: convert BUG_TRAP to generic WARN_ON
Diffstat (limited to 'net/ipv6/mip6.c')
-rw-r--r-- | net/ipv6/mip6.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c index ad1cc5bbf977..31295c8f6196 100644 --- a/net/ipv6/mip6.c +++ b/net/ipv6/mip6.c | |||
@@ -164,8 +164,8 @@ static int mip6_destopt_output(struct xfrm_state *x, struct sk_buff *skb) | |||
164 | calc_padlen(sizeof(*dstopt), 6)); | 164 | calc_padlen(sizeof(*dstopt), 6)); |
165 | 165 | ||
166 | hao->type = IPV6_TLV_HAO; | 166 | hao->type = IPV6_TLV_HAO; |
167 | BUILD_BUG_ON(sizeof(*hao) != 18); | ||
167 | hao->length = sizeof(*hao) - 2; | 168 | hao->length = sizeof(*hao) - 2; |
168 | BUG_TRAP(hao->length == 16); | ||
169 | 169 | ||
170 | len = ((char *)hao - (char *)dstopt) + sizeof(*hao); | 170 | len = ((char *)hao - (char *)dstopt) + sizeof(*hao); |
171 | 171 | ||
@@ -174,7 +174,7 @@ static int mip6_destopt_output(struct xfrm_state *x, struct sk_buff *skb) | |||
174 | memcpy(&iph->saddr, x->coaddr, sizeof(iph->saddr)); | 174 | memcpy(&iph->saddr, x->coaddr, sizeof(iph->saddr)); |
175 | spin_unlock_bh(&x->lock); | 175 | spin_unlock_bh(&x->lock); |
176 | 176 | ||
177 | BUG_TRAP(len == x->props.header_len); | 177 | WARN_ON(len != x->props.header_len); |
178 | dstopt->hdrlen = (x->props.header_len >> 3) - 1; | 178 | dstopt->hdrlen = (x->props.header_len >> 3) - 1; |
179 | 179 | ||
180 | return 0; | 180 | return 0; |
@@ -317,7 +317,7 @@ static int mip6_destopt_init_state(struct xfrm_state *x) | |||
317 | x->props.header_len = sizeof(struct ipv6_destopt_hdr) + | 317 | x->props.header_len = sizeof(struct ipv6_destopt_hdr) + |
318 | calc_padlen(sizeof(struct ipv6_destopt_hdr), 6) + | 318 | calc_padlen(sizeof(struct ipv6_destopt_hdr), 6) + |
319 | sizeof(struct ipv6_destopt_hao); | 319 | sizeof(struct ipv6_destopt_hao); |
320 | BUG_TRAP(x->props.header_len == 24); | 320 | WARN_ON(x->props.header_len != 24); |
321 | 321 | ||
322 | return 0; | 322 | return 0; |
323 | } | 323 | } |
@@ -380,7 +380,7 @@ static int mip6_rthdr_output(struct xfrm_state *x, struct sk_buff *skb) | |||
380 | rt2->rt_hdr.segments_left = 1; | 380 | rt2->rt_hdr.segments_left = 1; |
381 | memset(&rt2->reserved, 0, sizeof(rt2->reserved)); | 381 | memset(&rt2->reserved, 0, sizeof(rt2->reserved)); |
382 | 382 | ||
383 | BUG_TRAP(rt2->rt_hdr.hdrlen == 2); | 383 | WARN_ON(rt2->rt_hdr.hdrlen != 2); |
384 | 384 | ||
385 | memcpy(&rt2->addr, &iph->daddr, sizeof(rt2->addr)); | 385 | memcpy(&rt2->addr, &iph->daddr, sizeof(rt2->addr)); |
386 | spin_lock_bh(&x->lock); | 386 | spin_lock_bh(&x->lock); |