chiark / gitweb /
networkd: add support to configure IP Rule (#5725)
authorSusant Sahani <ssahani@users.noreply.github.com>
Thu, 14 Sep 2017 19:51:39 +0000 (19:51 +0000)
committerSven Eden <yamakuzure@gmx.net>
Mon, 25 Sep 2017 12:38:59 +0000 (14:38 +0200)
commit9d003f5a76e423ddd0921ccaeaa9369eadeea15b
treec6c3b388f9be7087ae7f8e73cb85db4d2729d2ee
parentf478a555312750ee848b23625144eb8ac84db2d4
networkd: add support to configure IP Rule (#5725)

Routing Policy rule manipulates rules in the routing policy database control the
route selection algorithm.

This work supports to configure Rule
```
[RoutingPolicyRule]
TypeOfService=0x08
Table=7
From= 192.168.100.18

```

```
ip rule show
0: from all lookup local
0: from 192.168.100.18 tos 0x08 lookup 7
```

V2 changes:

1. Added logic to handle duplicate rules.
2. If rules are changed or deleted and networkd restarted
   then those are deleted when networkd restarts next time

V3:

1. Add parse_fwmark_fwmask
src/basic/missing.h