Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForwardExists ¶
ForwardExists check that at least 2 rules are present in the CNI-HOSTPORT-DNAT chain and checks for regex matches in the list of rules
func GetRedirectedChain ¶
func GetRedirectedChain(t *testing.T, ipt *iptables.IPTables, chain, namespace, containerID string) string
GetRedirectedChain returns the chain where the traffic is being redirected. This is how libcni manage its port maps. Suppose you have the following rule: -A CNI-HOSTPORT-DNAT -p tcp -m comment --comment "dnat name: \"bridge\" id: \"default-YYYYYY\"" -m multiport --dports 9999 -j CNI-DN-XXXXXX So the chain where the traffic is redirected is CNI-DN-XXXXXX Returns an empty string in case nothing was found.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.