4f517df764156389ebdb35b63416fc23b81c9c5d
[openwrt.git] / package / network / services / ppp / patches / 430-pppol2tpv3-struct.patch
1 pppol2tp: Provide struct pppol2tpv3_addr to align with Linux
2
3 The struct pppol2tpv3_addr is referenced in the current Linux kernel sources
4 but not provided by the shipped kernel headers, add it.
5
6 Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
7
8 --- a/include/linux/if_pppol2tp.h
9 +++ b/include/linux/if_pppol2tp.h
10 @@ -32,6 +32,20 @@ struct pppol2tp_addr
11         __u16 d_tunnel, d_session;      /* For sending outgoing packets */
12  };
13  
14 +/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
15 + * bits. So we need a different sockaddr structure.
16 + */
17 +struct pppol2tpv3_addr {
18 +       pid_t   pid;                    /* pid that owns the fd.
19 +                                        * 0 => current */
20 +       int     fd;                     /* FD of UDP or IP socket to use */
21 +
22 +       struct sockaddr_in addr;        /* IP address and port to send to */
23 +
24 +       __u32 s_tunnel, s_session;      /* For matching incoming packets */
25 +       __u32 d_tunnel, d_session;      /* For sending outgoing packets */
26 +};
27 +
28  /* Socket options:
29   * DEBUG       - bitmask of debug message categories
30   * SENDSEQ     - 0 => don't send packets with sequence numbers