From: Jiri Slaby <jslaby@suse.cz>
Subject: kABI: protect ip_options_rcv_srr
Patch-mainline: never, kabi
References: kabi
In networking-stable-19_04_10, commit
8c83f2df9c6578ea4c5b940d8238ad8a41b87e9e (vrf: check accept_source_route
on the original netdevice) added a parameter to ip_options_rcv_srr.
This indeed changed the checksum of this exported function and the kABI
checker now complains.
Introduce ip_options_rcv_srr2 with the new set of parameters and let
ip_options_rcv_srr as it was.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
include/net/ip.h | 3 ++-
net/ipv4/ip_input.c | 2 +-
net/ipv4/ip_options.c | 8 +++++++-
3 files changed, 10 insertions(+), 3 deletions(-)
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -594,7 +594,8 @@ int ip_options_get_from_user(struct net
unsigned char __user *data, int optlen);
void ip_options_undo(struct ip_options *opt);
void ip_forward_options(struct sk_buff *skb);
-int ip_options_rcv_srr(struct sk_buff *skb, struct net_device *dev);
+int ip_options_rcv_srr(struct sk_buff *skb);
+int ip_options_rcv_srr2(struct sk_buff *skb, struct net_device *dev);
/*
* Functions provided by ip_sockglue.c
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -298,7 +298,7 @@ static inline bool ip_rcv_options(struct
}
}
- if (ip_options_rcv_srr(skb, dev))
+ if (ip_options_rcv_srr2(skb, dev))
goto drop;
}
--- a/net/ipv4/ip_options.c
+++ b/net/ipv4/ip_options.c
@@ -614,7 +614,7 @@ void ip_forward_options(struct sk_buff *
}
}
-int ip_options_rcv_srr(struct sk_buff *skb, struct net_device *dev)
+int ip_options_rcv_srr2(struct sk_buff *skb, struct net_device *dev)
{
struct ip_options *opt = &(IPCB(skb)->opt);
int srrspace, srrptr;
@@ -670,4 +670,10 @@ int ip_options_rcv_srr(struct sk_buff *s
}
return 0;
}
+EXPORT_SYMBOL(ip_options_rcv_srr2);
+
+int ip_options_rcv_srr(struct sk_buff *skb)
+{
+ return ip_options_rcv_srr2(skb, skb->dev);
+}
EXPORT_SYMBOL(ip_options_rcv_srr);