From dd61e58d94240df628a568c5609b1441746f4a54 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 24 Dec 2018 16:52:56 +0100 Subject: sys/linux: extend AX25/ROSE/NETROM descriptions --- sys/linux/init.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sys/linux/init.go') diff --git a/sys/linux/init.go b/sys/linux/init.go index cef483990..5c40e566f 100644 --- a/sys/linux/init.go +++ b/sys/linux/init.go @@ -30,6 +30,9 @@ func InitTarget(target *prog.Target) { AF_NFC: target.GetConst("AF_NFC"), AF_LLC: target.GetConst("AF_LLC"), AF_BLUETOOTH: target.GetConst("AF_BLUETOOTH"), + AF_AX25: target.GetConst("AF_AX25"), + AF_NETROM: target.GetConst("AF_NETROM"), + AF_ROSE: target.GetConst("AF_ROSE"), // These are not present on all arches. ARCH_SET_FS: target.ConstMap["ARCH_SET_FS"], ARCH_SET_GS: target.ConstMap["ARCH_SET_GS"], @@ -111,6 +114,9 @@ type arch struct { AF_NFC uint64 AF_LLC uint64 AF_BLUETOOTH uint64 + AF_AX25 uint64 + AF_NETROM uint64 + AF_ROSE uint64 } func (arch *arch) sanitizeCall(c *prog.Call) { @@ -176,7 +182,8 @@ func (arch *arch) sanitizeCall(c *prog.Call) { // Don't let it mess with arbitrary sockets in init namespace. family := c.Args[0].(*prog.ConstArg) switch uint64(uint32(family.Val)) { - case arch.AF_NFC, arch.AF_LLC, arch.AF_BLUETOOTH: + case arch.AF_NFC, arch.AF_LLC, arch.AF_BLUETOOTH, + arch.AF_AX25, arch.AF_NETROM, arch.AF_ROSE: default: family.Val = ^uint64(0) } -- cgit mrf-deployment