Browse Source

netlink_route: implement RTM_{NEW,DEL,GET}CHAIN decoding

* xlat/nl_route_types.in (RTM_NEWCHAIN, RTM_DELCHAIN, RTM_GETCHAIN): New
constants introduced by Linux kernel commit v4.19-rc1~140^2~279^2~9.
* netlink_route.c (route_decoders) <[RTM_NEWCHAIN - RTM_BASE],
[RTM_DELCHAIN - RTM_BASE], [RTM_GETCHAIN - RTM_BASE]>: Invoke
decode_tcmsg.
* NEWS: Mention this.
Eugene Syromyatnikov 1 year ago
parent
commit
0f94363a7d
3 changed files with 10 additions and 1 deletions
  1. 1
    0
      NEWS
  2. 5
    1
      netlink_route.c
  3. 4
    0
      xlat/nl_route_types.in

+ 1
- 0
NEWS View File

@@ -2,6 +2,7 @@ Noteworthy changes in release ?.? (????-??-??)
2 2
 ==============================================
3 3
 
4 4
 * Improvements
5
+  * Enhanced decoding of NETLINK_ROUTE protocol.
5 6
   * Updated lists of BPF_*, ETH_*, KEYCTL_*, KVM_*, MAP_*, SO_*, TCP_*, V4L2_*,
6 7
     XDP_*, and *_MAGIC constants.
7 8
 

+ 5
- 1
netlink_route.c View File

@@ -98,7 +98,11 @@ static const netlink_route_decoder_t route_decoders[] = {
98 98
 
99 99
 	[RTM_DELNSID - RTM_BASE] = decode_rtgenmsg,
100 100
 	[RTM_GETNSID - RTM_BASE] = decode_rtgenmsg,
101
-	[RTM_NEWNSID - RTM_BASE] = decode_rtgenmsg
101
+	[RTM_NEWNSID - RTM_BASE] = decode_rtgenmsg,
102
+
103
+	[RTM_NEWCHAIN - RTM_BASE] = decode_tcmsg,
104
+	[RTM_DELCHAIN - RTM_BASE] = decode_tcmsg,
105
+	[RTM_GETCHAIN - RTM_BASE] = decode_tcmsg,
102 106
 };
103 107
 
104 108
 bool

+ 4
- 0
xlat/nl_route_types.in View File

@@ -69,3 +69,7 @@ RTM_GETNSID	90
69 69
 
70 70
 RTM_NEWSTATS	92
71 71
 RTM_GETSTATS	94
72
+
73
+RTM_NEWCHAIN	100
74
+RTM_DELCHAIN	101
75
+RTM_GETCHAIN	102

Loading…
Cancel
Save