unix: add ICMP_FILTER constant on linux
Change-Id: I9ce0932c28ae8634270d69b0bd23216e963cc105
Reviewed-on: https://go-review.googlesource.com/c/sys/+/303369
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/unix/mkerrors.sh b/unix/mkerrors.sh
index 87f9d1e..0bdc9b5 100755
--- a/unix/mkerrors.sh
+++ b/unix/mkerrors.sh
@@ -216,6 +216,7 @@
#include <linux/genetlink.h>
#include <linux/hdreg.h>
#include <linux/hidraw.h>
+#include <linux/icmp.h>
#include <linux/icmpv6.h>
#include <linux/if.h>
#include <linux/if_addr.h>
@@ -500,7 +501,7 @@
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL)_/ ||
$2 ~ /^TP_STATUS_/ ||
$2 ~ /^FALLOC_/ ||
- $2 == "ICMPV6_FILTER" ||
+ $2 ~ /^ICMP(V6)?_FILTER$/ ||
$2 == "SOMAXCONN" ||
$2 == "NAME_MAX" ||
$2 == "IFNAMSIZ" ||
diff --git a/unix/zerrors_linux.go b/unix/zerrors_linux.go
index 504dd6c..3b1b928 100644
--- a/unix/zerrors_linux.go
+++ b/unix/zerrors_linux.go
@@ -974,6 +974,7 @@
HUGETLBFS_MAGIC = 0x958458f6
IBSHIFT = 0x10
ICMPV6_FILTER = 0x1
+ ICMP_FILTER = 0x1
ICRNL = 0x100
IFA_F_DADFAILED = 0x8
IFA_F_DEPRECATED = 0x20