| 184 | (VXLAN_PARAM_WITH_REMOTE_ADDR4 | VXLAN_PARAM_WITH_REMOTE_ADDR6) |
| 185 | |
| 186 | static void |
| 187 | vxlan_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 |