diff options
-rw-r--r-- | net/ipv4/xfrm4_mode_beet.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index 3650e027ce70..0f7c3e30e4e6 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c | |||
@@ -29,7 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb) | 30 | static int xfrm4_beet_output(struct xfrm_state *x, struct sk_buff *skb) |
31 | { | 31 | { |
32 | struct iphdr *iph, *top_iph = NULL; | 32 | struct iphdr *iph, *top_iph; |
33 | int hdrlen, optlen; | 33 | int hdrlen, optlen; |
34 | 34 | ||
35 | iph = ip_hdr(skb); | 35 | iph = ip_hdr(skb); |
@@ -73,11 +73,9 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb) | |||
73 | struct iphdr *iph = ip_hdr(skb); | 73 | struct iphdr *iph = ip_hdr(skb); |
74 | int phlen = 0; | 74 | int phlen = 0; |
75 | int optlen = 0; | 75 | int optlen = 0; |
76 | __u8 ph_nexthdr = 0, protocol = 0; | 76 | u8 ph_nexthdr = 0; |
77 | int err = -EINVAL; | 77 | int err = -EINVAL; |
78 | 78 | ||
79 | protocol = iph->protocol; | ||
80 | |||
81 | if (unlikely(iph->protocol == IPPROTO_BEETPH)) { | 79 | if (unlikely(iph->protocol == IPPROTO_BEETPH)) { |
82 | struct ip_beet_phdr *ph; | 80 | struct ip_beet_phdr *ph; |
83 | 81 | ||
@@ -109,8 +107,6 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb) | |||
109 | iph->saddr = x->sel.saddr.a4; | 107 | iph->saddr = x->sel.saddr.a4; |
110 | if (ph_nexthdr) | 108 | if (ph_nexthdr) |
111 | iph->protocol = ph_nexthdr; | 109 | iph->protocol = ph_nexthdr; |
112 | else | ||
113 | iph->protocol = protocol; | ||
114 | iph->check = 0; | 110 | iph->check = 0; |
115 | iph->check = ip_fast_csum(skb_network_header(skb), iph->ihl); | 111 | iph->check = ip_fast_csum(skb_network_header(skb), iph->ihl); |
116 | err = 0; | 112 | err = 0; |