iproute2: shrink ip-tiny size by disabling features

With the 5.18 and 5.19 update ip-tiny grows in size. Remove some
features bringing it back to the size before 5.18.

Remove
- Identifier-locator addressing (ila)
- MACsec Device Configuration (macsec)
- Multicast Routing Cache Management (mroute)
- mrule
- Virtual Routing and Forwarding (vrf)
- Segment Routing (sr)

Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
Nick Hainke 2022-08-06 23:35:12 +02:00 committed by breakings
parent 56d38a961a
commit a350a1cea5

View File

@ -36,14 +36,14 @@
" ntbl | route | rule | sr | tap | tcpmetrics |\n" " ntbl | route | rule | sr | tap | tcpmetrics |\n"
" token | tunnel | tuntap | vrf | xfrm }\n" " token | tunnel | tuntap | vrf | xfrm }\n"
+#else +#else
+ "where OBJECT := { address | ila | link | macsec | maddress | monitor |\n" + "where OBJECT := { address | link | maddress | monitor |\n"
+ " mroute | mrule | neighbor | neighbour | netns | route |\n" + " neighbor | neighbour | netns | route |\n"
+ " rule | sr | token | tunnel | vrf }\n" + " rule | token | tunnel }\n"
+#endif +#endif
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n" " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
" -h[uman-readable] | -iec | -j[son] | -p[retty] |\n" " -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
" -f[amily] { inet | inet6 | mpls | bridge | link } |\n" " -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
@@ -91,37 +97,51 @@ static const struct cmd { @@ -91,37 +97,49 @@ static const struct cmd {
int (*func)(int argc, char **argv); int (*func)(int argc, char **argv);
} cmds[] = { } cmds[] = {
{ "address", do_ipaddr }, { "address", do_ipaddr },
@ -63,9 +63,9 @@
+#ifndef IPROUTE2_TINY +#ifndef IPROUTE2_TINY
{ "l2tp", do_ipl2tp }, { "l2tp", do_ipl2tp },
{ "fou", do_ipfou }, { "fou", do_ipfou },
+#endif
{ "ila", do_ipila }, { "ila", do_ipila },
{ "macsec", do_ipmacsec }, { "macsec", do_ipmacsec },
+#endif
{ "tunnel", do_iptunnel }, { "tunnel", do_iptunnel },
{ "tunl", do_iptunnel }, { "tunl", do_iptunnel },
+#ifndef IPROUTE2_TINY +#ifndef IPROUTE2_TINY
@ -78,16 +78,14 @@
{ "monitor", do_ipmonitor }, { "monitor", do_ipmonitor },
+#ifndef IPROUTE2_TINY +#ifndef IPROUTE2_TINY
{ "xfrm", do_xfrm }, { "xfrm", do_xfrm },
+#endif
{ "mroute", do_multiroute }, { "mroute", do_multiroute },
{ "mrule", do_multirule }, { "mrule", do_multirule },
+#endif
{ "netns", do_netns }, { "netns", do_netns },
+#ifndef IPROUTE2_TINY +#ifndef IPROUTE2_TINY
{ "netconf", do_ipnetconf }, { "netconf", do_ipnetconf },
+#endif
{ "vrf", do_ipvrf}, { "vrf", do_ipvrf},
{ "sr", do_seg6 }, { "sr", do_seg6 },
+#ifndef IPROUTE2_TINY
{ "nexthop", do_ipnh }, { "nexthop", do_ipnh },
{ "mptcp", do_mptcp }, { "mptcp", do_mptcp },
{ "ioam", do_ioam6 }, { "ioam", do_ioam6 },