ip: Add support for "noprefixroute" option

The "noprefixroute" option suppresses automatic generation of a routing
table entry based on the interface's ip address.

The ifa_flags field has only 8 bit. If higher bits are set,
rta_tb[IFA_FLAGS] has to be used instead.

Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Christian Eggers
2020-06-29 17:57:25 +02:00
committed by Denys Vlasenko
parent 39925026f6
commit 31d34f3bd8
2 changed files with 33 additions and 16 deletions

View File

@ -146,11 +146,13 @@
//usage:#define ipaddr_trivial_usage
//usage: "add|del IFADDR dev IFACE | show|flush [dev IFACE] [to PREFIX]"
//usage:#define ipaddr_full_usage "\n\n"
//usage: "ipaddr add|change|replace|delete dev IFACE IFADDR\n"
//usage: "ipaddr add|change|replace|delete dev IFACE [CONFFLAG-LIST] IFADDR\n"
//usage: " IFADDR := PREFIX | ADDR peer PREFIX [broadcast ADDR|+|-]\n"
//usage: " [anycast ADDR] [label STRING] [scope SCOPE]\n"
//usage: " PREFIX := ADDR[/MASK]\n"
//usage: " SCOPE := [host|link|global|NUMBER]\n"
//usage: " CONFFLAG-LIST := [CONFFLAG-LIST] CONFFLAG\n"
//usage: " CONFFLAG := [noprefixroute]\n"
//usage: "ipaddr show|flush [dev IFACE] [scope SCOPE] [to PREFIX] [label PATTERN]"
//usage:
//--------------123456789.123456789.123456789.123456789.123456789.123456789.123456789.123....79