diff --git a/install.sh b/install.sh index 6a1fe63..ee5413f 100755 --- a/install.sh +++ b/install.sh @@ -16,4 +16,5 @@ cd $1/libnl-3.7.0 ./configure patch -p1 < $1/slove-oh-update-sp3.patch --fuzz=0 --no-backup-if-mismatch patch -p1 < $1/solve-oh-compile-problem.patch --fuzz=0 --no-backup-if-mismatch +patch -p1 < $1/slove-oh-bug-fix.patch --fuzz=0 --no-backup-if-mismatch exit 0 diff --git a/slove-oh-bug-fix.patch b/slove-oh-bug-fix.patch new file mode 100644 index 0000000..0602a60 --- /dev/null +++ b/slove-oh-bug-fix.patch @@ -0,0 +1,35 @@ +diff -urN libnl-3.7.0/lib/nl.c libnl-3.7.0_new/lib/nl.c +--- libnl-3.7.0/lib/nl.c 2022-05-04 00:50:34.000000000 +0800 ++++ libnl-3.7.0_new/lib/nl.c 2024-08-08 15:28:38.266789900 +0800 +@@ -481,7 +481,7 @@ + nlh->nlmsg_pid = nl_socket_get_local_port(sk); + + if (nlh->nlmsg_seq == NL_AUTO_SEQ) +- nlh->nlmsg_seq = sk->s_seq_next++; ++ nlh->nlmsg_seq = nl_socket_use_seq(sk); + + if (msg->nm_protocol == -1) + msg->nm_protocol = sk->s_proto; +diff -urN libnl-3.7.0/lib/socket.c libnl-3.7.0_new/lib/socket.c +--- libnl-3.7.0/lib/socket.c 2022-05-24 16:55:12.000000000 +0800 ++++ libnl-3.7.0_new/lib/socket.c 2024-08-08 15:29:22.409796400 +0800 +@@ -22,7 +22,7 @@ + */ + + #include "defs.h" +- ++#include + #include "sys/socket.h" + + #include +@@ -291,6 +291,10 @@ + */ + unsigned int nl_socket_use_seq(struct nl_sock *sk) + { ++ if (sk->s_seq_next == UINT_MAX) { ++ sk->s_seq_next = 0; ++ return UINT_MAX; ++ } + return sk->s_seq_next++; + } +