]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/net/ip.h
inet: add RCU protection to inet->opt
[mirror_ubuntu-zesty-kernel.git] / include / net / ip.h
index 7c416583b71049cbc15b5492e5f2aa1a85254dd0..3a59bf99aa3a1f546c182924ede97566486c2e1b 100644 (file)
@@ -52,7 +52,7 @@ static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
 struct ipcm_cookie {
        __be32                  addr;
        int                     oif;
-       struct ip_options       *opt;
+       struct ip_options_rcu   *opt;
        __u8                    tx_flags;
 };
 
@@ -92,7 +92,7 @@ extern int            igmp_mc_proc_init(void);
 
 extern int             ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk,
                                              __be32 saddr, __be32 daddr,
-                                             struct ip_options *opt);
+                                             struct ip_options_rcu *opt);
 extern int             ip_rcv(struct sk_buff *skb, struct net_device *dev,
                               struct packet_type *pt, struct net_device *orig_dev);
 extern int             ip_local_deliver(struct sk_buff *skb);
@@ -416,14 +416,15 @@ extern int ip_forward(struct sk_buff *skb);
  *     Functions provided by ip_options.c
  */
  
-extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt, __be32 daddr, struct rtable *rt, int is_frag);
+extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt,
+                            __be32 daddr, struct rtable *rt, int is_frag);
 extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb);
 extern void ip_options_fragment(struct sk_buff *skb);
 extern int ip_options_compile(struct net *net,
                              struct ip_options *opt, struct sk_buff *skb);
-extern int ip_options_get(struct net *net, struct ip_options **optp,
+extern int ip_options_get(struct net *net, struct ip_options_rcu **optp,
                          unsigned char *data, int optlen);
-extern int ip_options_get_from_user(struct net *net, struct ip_options **optp,
+extern int ip_options_get_from_user(struct net *net, struct ip_options_rcu **optp,
                                    unsigned char __user *data, int optlen);
 extern void ip_options_undo(struct ip_options * opt);
 extern void ip_forward_options(struct sk_buff *skb);