0015-fix-ipv6-ipset-bug-in-master.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 3becf468bad699bfdcb2d18d553bc72d4c79e23c Mon Sep 17 00:00:00 2001
  2. From: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
  3. Date: Wed, 12 Dec 2018 12:00:19 +0000
  4. Subject: [PATCH 15/32] fix ipv6 ipset bug in master
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Hi Simon,
  9. Another one fallen out of the librecmc tree shake :-)
  10. ipv6 ipset addresses weren’t being set correctly. patch attached
  11. Cheers,
  12. Kevin D-B
  13. 012C ACB2 28C6 C53E 9775 9123 B3A2 389B 9DE2 334A
  14. From b50fc0491e374186f982b019f293379955afd203 Mon Sep 17 00:00:00 2001
  15. From: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
  16. Date: Wed, 12 Dec 2018 11:35:12 +0000
  17. Subject: [PATCH] ipset fix ternary order swap
  18. ee87504 Remove ability to compile without IPv6 support introduced a
  19. ternary operator for ip address size. Unfortunately the true/false
  20. order was incorrect which meant ipv6 ipset addresses were added
  21. incorrectly.
  22. Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
  23. ---
  24. src/ipset.c | 2 +-
  25. 1 file changed, 1 insertion(+), 1 deletion(-)
  26. --- a/src/ipset.c
  27. +++ b/src/ipset.c
  28. @@ -120,7 +120,7 @@ static int new_add_to_ipset(const char *
  29. struct my_nfgenmsg *nfg;
  30. struct my_nlattr *nested[2];
  31. uint8_t proto;
  32. - int addrsz = (af == AF_INET6) ? INADDRSZ : IN6ADDRSZ;
  33. + int addrsz = (af == AF_INET6) ? IN6ADDRSZ : INADDRSZ;
  34. if (strlen(setname) >= IPSET_MAXNAMELEN)
  35. {