From 80d43738f1e4c648ccfc4599e17dc8ba455fe1ea Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 14 Mar 2020 16:42:00 +0100 Subject: prog: rename target.SanitizeCall to Neutralize We will need a wrapper for target.SanitizeCall that will do more than just calling the target-provided function. To avoid confusion and potential mistakes, give the target function and prog function different names. Prog package will continue to call this "sanitize", which will include target's "neutralize" + more. Also refactor API a bit: we need a helper function that sanitizes the whole program because that's needed most of the time. Fixes #477 Fixes #502 --- sys/linux/init_iptables.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/linux/init_iptables.go') diff --git a/sys/linux/init_iptables.go b/sys/linux/init_iptables.go index 2a49bffe4..a1adf3fb0 100644 --- a/sys/linux/init_iptables.go +++ b/sys/linux/init_iptables.go @@ -164,7 +164,7 @@ func (arch *arch) generateEbtables(g *prog.Gen, typ prog.Type, old prog.Arg) ( return } -func (arch *arch) sanitizeEbtables(c *prog.Call) { +func (arch *arch) neutralizeEbtables(c *prog.Call) { // This is very hacky... just as netfilter interfaces. // setsockopt's len argument must be equal to size of ebt_replace + entries size. lenArg := c.Args[4].(*prog.ConstArg) -- cgit mrf-deployment