- case SUBNET_IPV4: fprintf(out, "ip route add %s dev \"$INTERFACE\"\n", subnet_str); break;
- case SUBNET_IPV6: fprintf(out, "ip route add %s dev \"$INTERFACE\"\n", subnet_str); break;
- }
- }
-#elif defined(HAVE_BSD)
- // BSD route command is silly and doesn't accept an interface name as a destination.
- if(!*gateway_str) {
- switch(subnet.type) {
- case SUBNET_IPV4:
- if(!ipv4.type) {
- fprintf(stderr, "Route requested but no Ifconfig\n");
- return;
- }
- net2str(gateway_str, sizeof gateway_str, &ipv4);
- break;
- case SUBNET_IPV6:
- if(!ipv6.type) {
- fprintf(stderr, "Route requested but no Ifconfig\n");
- return;
- }
- net2str(gateway_str, sizeof gateway_str, &ipv6);
- break;
+ case SUBNET_IPV4:
+ fprintf(out, "ip route add %s dev \"$INTERFACE\"\n", subnet_str);
+ break;
+
+ case SUBNET_IPV6:
+ fprintf(out, "ip route add %s dev \"$INTERFACE\"\n", subnet_str);
+ break;
+
+ case SUBNET_MAC:
+ default:
+ return;