mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
fix netift
This commit is contained in:
parent
b76bbb581c
commit
5930a09dfc
38 changed files with 1918 additions and 68 deletions
26
netifd/patches/084-enlarge-nlmsg-size.patch
Normal file
26
netifd/patches/084-enlarge-nlmsg-size.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
diff -Nur a/system-linux.c netifd-2019-08-05-5e02f944/system-linux.c
|
||||
--- a/system-linux.c 2020-05-04 12:50:37.870719671 -0700
|
||||
+++ netifd-2019-08-05-5e02f944/system-linux.c 2020-05-04 12:57:00.512680452 -0700
|
||||
@@ -2561,8 +2561,7 @@
|
||||
static int system_add_ip6_tunnel(const char *name, const unsigned int link,
|
||||
struct blob_attr **tb)
|
||||
{
|
||||
- struct nl_msg *nlm = nlmsg_alloc_simple(RTM_NEWLINK,
|
||||
- NLM_F_REQUEST | NLM_F_REPLACE | NLM_F_CREATE);
|
||||
+ struct nl_msg *nlm = nlmsg_alloc_size(65536);
|
||||
struct ifinfomsg ifi = { .ifi_family = AF_UNSPEC };
|
||||
struct blob_attr *cur;
|
||||
int ret = 0, ttl = 0;
|
||||
@@ -2570,6 +2569,12 @@
|
||||
if (!nlm)
|
||||
return -1;
|
||||
|
||||
+ struct nlmsghdr *new = nlm->nm_nlh;
|
||||
+ new->nlmsg_type = RTM_NEWLINK;
|
||||
+ new->nlmsg_flags = NLM_F_REQUEST | NLM_F_REPLACE | NLM_F_CREATE;
|
||||
+ new->nlmsg_seq = 0;
|
||||
+ new->nlmsg_pid = 0;
|
||||
+
|
||||
nlmsg_append(nlm, &ifi, sizeof(ifi), 0);
|
||||
nla_put_string(nlm, IFLA_IFNAME, name);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue