mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-19 13:31:28 +02:00
iproute2: restore two mistakenly deleted patches
Commit 3d5e4758 pruned a little too deeply.
This commit is contained in:
parent
badd38240c
commit
fa7075a057
48
sdk_container/src/third_party/coreos-overlay/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch
vendored
Normal file
48
sdk_container/src/third_party/coreos-overlay/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
http://bugs.gentoo.org/291907
|
||||
|
||||
This patch was merged from two patches extracted from this thread:
|
||||
http://markmail.org/thread/qkd76gpdgefpjlfn
|
||||
|
||||
tc_stab.c: small fixes to commandline help
|
||||
|
||||
|
||||
tc_core.c:
|
||||
As kernel part of things relies on cell align which is always set to -1,
|
||||
I also added it to userspace computation stage. This way if someone
|
||||
specified e.g. 2048 and 512 for mtu and tsize respectively, one wouldn't
|
||||
end with tsize supporting mtu 4096 suddenly, New default mtu is also set
|
||||
to 2048 (disregarding weirdness of setting mtu to such values).
|
||||
|
||||
|
||||
Unless I missed something, this is harmless and feels cleaner, but if it's
|
||||
not allowed, documentation will have to be changed back to 2047 + extra
|
||||
explanation as well.
|
||||
|
||||
--- iproute2/tc/tc_core.c
|
||||
+++ iproute2/tc/tc_core.c
|
||||
@@ -155,12 +155,12 @@
|
||||
}
|
||||
|
||||
if (s->mtu == 0)
|
||||
- s->mtu = 2047;
|
||||
+ s->mtu = 2048;
|
||||
if (s->tsize == 0)
|
||||
s->tsize = 512;
|
||||
|
||||
s->cell_log = 0;
|
||||
- while ((s->mtu >> s->cell_log) > s->tsize - 1)
|
||||
+ while ((s->mtu - 1 >> s->cell_log) > s->tsize - 1)
|
||||
s->cell_log++;
|
||||
|
||||
*stab = malloc(s->tsize * sizeof(__u16));
|
||||
--- iproute2/tc/tc_stab.c
|
||||
+++ iproute2/tc/tc_stab.c
|
||||
@@ -32,7 +32,7 @@
|
||||
fprintf(stderr,
|
||||
"Usage: ... stab [ mtu BYTES ] [ tsize SLOTS ] [ mpu BYTES ] \n"
|
||||
" [ overhead BYTES ] [ linklayer TYPE ] ...\n"
|
||||
- " mtu : max packet size we create rate map for {2047}\n"
|
||||
+ " mtu : max packet size we create size table for {2048}\n"
|
||||
" tsize : how many slots should size table have {512}\n"
|
||||
" mpu : minimum packet size used in rate computations\n"
|
||||
" overhead : per-packet size overhead used in rate computations\n"
|
@ -0,0 +1,41 @@
|
||||
https://bugs.gentoo.org/326849
|
||||
|
||||
allow ipv6 to be disabled
|
||||
|
||||
--- a/ip/iptunnel.c
|
||||
+++ b/ip/iptunnel.c
|
||||
@@ -456,13 +456,6 @@ int do_iptunnel(int argc, char **argv)
|
||||
break;
|
||||
case AF_INET:
|
||||
break;
|
||||
- /*
|
||||
- * This is silly enough but we have no easy way to make it
|
||||
- * protocol-independent because of unarranged structure between
|
||||
- * IPv4 and IPv6.
|
||||
- */
|
||||
- case AF_INET6:
|
||||
- return do_ip6tunnel(argc, argv);
|
||||
default:
|
||||
fprintf(stderr, "Unsupported family:%d\n", preferred_family);
|
||||
exit(-1);
|
||||
--- a/ip/Makefile
|
||||
+++ b/ip/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
IPOBJ=ip.o ipaddress.o ipaddrlabel.o iproute.o iprule.o ipnetns.o \
|
||||
- rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
|
||||
- ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o \
|
||||
+ rtm_map.o iptunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \
|
||||
+ ipmaddr.o ipmonitor.o ipmroute.o iptuntap.o \
|
||||
ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o \
|
||||
iplink_vlan.o link_veth.o link_gre.o iplink_can.o \
|
||||
iplink_macvlan.o iplink_macvtap.o ipl2tp.o
|
||||
--- a/ip/ipmonitor.c
|
||||
+++ b/ip/ipmonitor.c
|
||||
@@ -76,7 +76,6 @@ int accept_msg(const struct sockaddr_nl *who,
|
||||
if (n->nlmsg_type == RTM_NEWPREFIX) {
|
||||
if (prefix_banner)
|
||||
fprintf(fp, "[PREFIX]");
|
||||
- print_prefix(who, n, arg);
|
||||
return 0;
|
||||
}
|
||||
if (n->nlmsg_type == RTM_NEWRULE || n->nlmsg_type == RTM_DELRULE) {
|
Loading…
x
Reference in New Issue
Block a user