MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vxlan_check_params

Function vxlan_check_params

tools/ifconfig/ifvxlan.c:186–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184 (VXLAN_PARAM_WITH_REMOTE_ADDR4 | VXLAN_PARAM_WITH_REMOTE_ADDR6)
185
186static void
187vxlan_check_params(void)
188{
189
190 if ((params.vxlp_with & _LOCAL_ADDR46) == _LOCAL_ADDR46)
191 errx(1, "cannot specify both local IPv4 and IPv6 addresses");
192 if ((params.vxlp_with & _REMOTE_ADDR46) == _REMOTE_ADDR46)
193 errx(1, "cannot specify both remote IPv4 and IPv6 addresses");
194 if ((params.vxlp_with & VXLAN_PARAM_WITH_LOCAL_ADDR4 &&
195 params.vxlp_with & VXLAN_PARAM_WITH_REMOTE_ADDR6) ||
196 (params.vxlp_with & VXLAN_PARAM_WITH_LOCAL_ADDR6 &&
197 params.vxlp_with & VXLAN_PARAM_WITH_REMOTE_ADDR4))
198 errx(1, "cannot mix IPv4 and IPv6 addresses");
199}
200
201#undef _LOCAL_ADDR46
202#undef _REMOTE_ADDR46

Callers 1

vxlan_createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected