@@ -268,12 +268,12 @@ static int nf_reject6_fill_skb_dst(struct sk_buff *skb_in)
268
268
void nf_send_reset6 (struct net * net , struct sock * sk , struct sk_buff * oldskb ,
269
269
int hook )
270
270
{
271
- struct sk_buff * nskb ;
272
- struct tcphdr _otcph ;
273
- const struct tcphdr * otcph ;
274
- unsigned int otcplen , hh_len ;
275
271
const struct ipv6hdr * oip6h = ipv6_hdr (oldskb );
276
272
struct dst_entry * dst = NULL ;
273
+ const struct tcphdr * otcph ;
274
+ struct sk_buff * nskb ;
275
+ struct tcphdr _otcph ;
276
+ unsigned int otcplen ;
277
277
struct flowi6 fl6 ;
278
278
279
279
if ((!(ipv6_addr_type (& oip6h -> saddr ) & IPV6_ADDR_UNICAST )) ||
@@ -312,9 +312,8 @@ void nf_send_reset6(struct net *net, struct sock *sk, struct sk_buff *oldskb,
312
312
if (IS_ERR (dst ))
313
313
return ;
314
314
315
- hh_len = (dst -> dev -> hard_header_len + 15 )& ~15 ;
316
- nskb = alloc_skb (hh_len + 15 + dst -> header_len + sizeof (struct ipv6hdr )
317
- + sizeof (struct tcphdr ) + dst -> trailer_len ,
315
+ nskb = alloc_skb (LL_MAX_HEADER + sizeof (struct ipv6hdr ) +
316
+ sizeof (struct tcphdr ) + dst -> trailer_len ,
318
317
GFP_ATOMIC );
319
318
320
319
if (!nskb ) {
@@ -327,7 +326,7 @@ void nf_send_reset6(struct net *net, struct sock *sk, struct sk_buff *oldskb,
327
326
328
327
nskb -> mark = fl6 .flowi6_mark ;
329
328
330
- skb_reserve (nskb , hh_len + dst -> header_len );
329
+ skb_reserve (nskb , LL_MAX_HEADER );
331
330
nf_reject_ip6hdr_put (nskb , oldskb , IPPROTO_TCP , ip6_dst_hoplimit (dst ));
332
331
nf_reject_ip6_tcphdr_put (nskb , oldskb , otcph , otcplen );
333
332
0 commit comments