Skip to content

Commit 06f1ecd

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next
Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2021-10-30 Just two minor changes this time: 1) Remove some superfluous header files from xfrm4_tunnel.c From Mianhan Liu. 2) Simplify some error checks in xfrm_input(). From luo penghao. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 894d084 + ad57dae commit 06f1ecd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

net/ipv4/xfrm4_tunnel.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
#include <linux/skbuff.h>
1010
#include <linux/module.h>
11-
#include <linux/mutex.h>
1211
#include <net/xfrm.h>
13-
#include <net/ip.h>
1412
#include <net/protocol.h>
1513

1614
static int ipip_output(struct xfrm_state *x, struct sk_buff *skb)

net/xfrm/xfrm_input.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
530530
goto drop;
531531
}
532532

533-
if ((err = xfrm_parse_spi(skb, nexthdr, &spi, &seq)) != 0) {
533+
if (xfrm_parse_spi(skb, nexthdr, &spi, &seq)) {
534534
XFRM_INC_STATS(net, LINUX_MIB_XFRMINHDRERROR);
535535
goto drop;
536536
}
@@ -560,7 +560,7 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
560560
}
561561

562562
seq = 0;
563-
if (!spi && (err = xfrm_parse_spi(skb, nexthdr, &spi, &seq)) != 0) {
563+
if (!spi && xfrm_parse_spi(skb, nexthdr, &spi, &seq)) {
564564
secpath_reset(skb);
565565
XFRM_INC_STATS(net, LINUX_MIB_XFRMINHDRERROR);
566566
goto drop;

0 commit comments

Comments
 (0)