Skip to content

Commit db43933

Browse files
authored
Merge pull request systemd#12576 from ssahani/fou
networkd: FOU tunnel support Local and Peer tunnel addresses
2 parents 86932c2 + 4502a61 commit db43933

File tree

18 files changed

+152
-13
lines changed

18 files changed

+152
-13
lines changed

man/systemd.netdev.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,18 @@
13101310
<varname>Encapsulation=GenericUDPEncapsulation</varname>, this must not be specified.</para>
13111311
</listitem>
13121312
</varlistentry>
1313+
<varlistentry>
1314+
<term><varname>Peer=</varname></term>
1315+
<listitem>
1316+
<para>Configures peer IP address.</para>
1317+
</listitem>
1318+
</varlistentry>
1319+
<varlistentry>
1320+
<term><varname>Local=</varname></term>
1321+
<listitem>
1322+
<para>Configures local IP address.</para>
1323+
</listitem>
1324+
</varlistentry>
13131325
</variablelist>
13141326
</refsect1>
13151327
<refsect1>

src/basic/linux/README

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
The files in this directory are copied from kernel-5.0, and the following modifications are applied:
1+
The files in this directory are copied from current kernel master
2+
(b06ed1e7a2fa9b636f368a9e97c3c8877623f8b2) or WireGuard master
3+
(8416093498ac2c754536dad4757c5d86c9ba8809), and the following
4+
modifications are applied:
25
- btrfs.h: drop '__user' attributes
36
- if.h: drop '#include <linux/compiler.h>' and '__user' attributes

src/basic/linux/btrfs.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ struct btrfs_scrub_progress {
135135
__u64 tree_bytes_scrubbed; /* # of tree bytes scrubbed */
136136
__u64 read_errors; /* # of read errors encountered (EIO) */
137137
__u64 csum_errors; /* # of failed csum checks */
138-
__u64 verify_errors; /* # of occurrences, where the metadata
138+
__u64 verify_errors; /* # of occurences, where the metadata
139139
* of a tree block did not match the
140140
* expected values, like generation or
141141
* logical */
@@ -155,7 +155,7 @@ struct btrfs_scrub_progress {
155155
__u64 last_physical; /* last physical address scrubbed. In
156156
* case a scrub was aborted, this can
157157
* be used to restart the scrub */
158-
__u64 unverified_errors; /* # of occurrences where a read for a
158+
__u64 unverified_errors; /* # of occurences where a read for a
159159
* full (64k) bio failed, but the re-
160160
* check succeeded for each 4k piece.
161161
* Intermittent error. */
@@ -837,6 +837,8 @@ enum btrfs_err_code {
837837
struct btrfs_ioctl_vol_args)
838838
#define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \
839839
struct btrfs_ioctl_vol_args)
840+
#define BTRFS_IOC_FORGET_DEV _IOW(BTRFS_IOCTL_MAGIC, 5, \
841+
struct btrfs_ioctl_vol_args)
840842
/* trans start and trans end are dangerous, and only for
841843
* use by applications that know how to avoid the
842844
* resulting deadlocks

src/basic/linux/btrfs_tree.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
/* for storing balance parameters in the root tree */
5555
#define BTRFS_BALANCE_OBJECTID -4ULL
5656

57-
/* orphan objectid for tracking unlinked/truncated files */
57+
/* orhpan objectid for tracking unlinked/truncated files */
5858
#define BTRFS_ORPHAN_OBJECTID -5ULL
5959

6060
/* does write ahead logging to speed up fsyncs */
@@ -270,7 +270,7 @@
270270
#define BTRFS_PERSISTENT_ITEM_KEY 249
271271

272272
/*
273-
* Persistently stores the device replace state in the device tree.
273+
* Persistantly stores the device replace state in the device tree.
274274
* The key is built like this: (0, BTRFS_DEV_REPLACE_KEY, 0).
275275
*/
276276
#define BTRFS_DEV_REPLACE_KEY 250
@@ -307,6 +307,8 @@
307307
*
308308
* Used by:
309309
* struct btrfs_dir_item.type
310+
*
311+
* Values 0..7 must match common file type values in fs_types.h.
310312
*/
311313
#define BTRFS_FT_UNKNOWN 0
312314
#define BTRFS_FT_REG_FILE 1

src/basic/linux/fou.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ enum {
1616
FOU_ATTR_IPPROTO, /* u8 */
1717
FOU_ATTR_TYPE, /* u8 */
1818
FOU_ATTR_REMCSUM_NOPARTIAL, /* flag */
19+
FOU_ATTR_LOCAL_V4, /* u32 */
20+
FOU_ATTR_LOCAL_V6, /* in6_addr */
21+
FOU_ATTR_PEER_V4, /* u32 */
22+
FOU_ATTR_PEER_V6, /* in6_addr */
23+
FOU_ATTR_PEER_PORT, /* u16 */
24+
FOU_ATTR_IFINDEX, /* s32 */
1925

2026
__FOU_ATTR_MAX,
2127
};

src/basic/linux/if.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ enum {
179179
};
180180

181181
/*
182-
* Device mapping structure. I'd just gone off and designed a
182+
* Device mapping structure. I'd just gone off and designed a
183183
* beautiful scheme using only loadable modules with arguments
184184
* for driver options and along come the PCMCIA people 8)
185185
*
@@ -193,7 +193,7 @@ enum {
193193
struct ifmap {
194194
unsigned long mem_start;
195195
unsigned long mem_end;
196-
unsigned short base_addr;
196+
unsigned short base_addr;
197197
unsigned char irq;
198198
unsigned char dma;
199199
unsigned char port;
@@ -233,7 +233,7 @@ struct ifreq {
233233
{
234234
char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
235235
} ifr_ifrn;
236-
236+
237237
union {
238238
struct sockaddr ifru_addr;
239239
struct sockaddr ifru_dstaddr;

src/basic/linux/if_bonding.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,30 @@ struct ad_info {
117117
__u8 partner_system[ETH_ALEN];
118118
};
119119

120+
/* Embedded inside LINK_XSTATS_TYPE_BOND */
121+
enum {
122+
BOND_XSTATS_UNSPEC,
123+
BOND_XSTATS_3AD,
124+
__BOND_XSTATS_MAX
125+
};
126+
#define BOND_XSTATS_MAX (__BOND_XSTATS_MAX - 1)
127+
128+
/* Embedded inside BOND_XSTATS_3AD */
129+
enum {
130+
BOND_3AD_STAT_LACPDU_RX,
131+
BOND_3AD_STAT_LACPDU_TX,
132+
BOND_3AD_STAT_LACPDU_UNKNOWN_RX,
133+
BOND_3AD_STAT_LACPDU_ILLEGAL_RX,
134+
BOND_3AD_STAT_MARKER_RX,
135+
BOND_3AD_STAT_MARKER_TX,
136+
BOND_3AD_STAT_MARKER_RESP_RX,
137+
BOND_3AD_STAT_MARKER_RESP_TX,
138+
BOND_3AD_STAT_MARKER_UNKNOWN_RX,
139+
BOND_3AD_STAT_PAD,
140+
__BOND_3AD_STAT_MAX
141+
};
142+
#define BOND_3AD_STAT_MAX (__BOND_3AD_STAT_MAX - 1)
143+
120144
#endif /* _LINUX_IF_BONDING_H */
121145

122146
/*

src/basic/linux/if_ether.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
#define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
110110
#define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
111111
#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
112+
#define ETH_P_DSA_8021Q 0xDADB /* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
112113
#define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */
113114
#define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */
114115

src/basic/linux/if_link.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,7 @@ enum {
925925
enum {
926926
LINK_XSTATS_TYPE_UNSPEC,
927927
LINK_XSTATS_TYPE_BRIDGE,
928+
LINK_XSTATS_TYPE_BOND,
928929
__LINK_XSTATS_TYPE_MAX
929930
};
930931
#define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)

src/basic/linux/if_tun.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
#define TUNSETSTEERINGEBPF _IOR('T', 224, int)
6161
#define TUNSETFILTEREBPF _IOR('T', 225, int)
6262
#define TUNSETCARRIER _IOW('T', 226, int)
63+
#define TUNGETDEVNETNS _IO('T', 227)
6364

6465
/* TUNSETIFF ifr flags */
6566
#define IFF_TUN 0x0001

0 commit comments

Comments
 (0)