diff options
author | Eric Dumazet <edumazet@google.com> | 2014-09-27 16:50:55 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-28 20:35:42 (GMT) |
commit | 24a2d43d8886f5a29c3cf108927f630c545a9a38 (patch) | |
tree | dd10e0199c6627b0eb93340f35d88d122c01f2ab /net/ipv4/ip_options.c | |
parent | ff04a771ad25fc9ba91690e73465b4d34b6bf8b3 (diff) | |
download | linux-24a2d43d8886f5a29c3cf108927f630c545a9a38.tar.xz |
ipv4: rename ip_options_echo to __ip_options_echo()
ip_options_echo() assumes struct ip_options is provided in &IPCB(skb)->opt
Lets break this assumption, but provide a helper to not change all call points.
ip_send_unicast_reply() gets a new struct ip_options pointer.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_options.c')
-rw-r--r-- | net/ipv4/ip_options.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index ad38249..5b3d91b 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c @@ -87,17 +87,15 @@ void ip_options_build(struct sk_buff *skb, struct ip_options *opt, * NOTE: dopt cannot point to skb. */ -int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb) +int __ip_options_echo(struct ip_options *dopt, struct sk_buff *skb, + const struct ip_options *sopt) { - const struct ip_options *sopt; unsigned char *sptr, *dptr; int soffset, doffset; int optlen; memset(dopt, 0, sizeof(struct ip_options)); - sopt = &(IPCB(skb)->opt); - if (sopt->optlen == 0) return 0; |