link_req = (struct link_req *)nlmsg;
link_req->ifinfomsg.ifi_family = AF_UNSPEC;
nlmsg->nlmsghdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
- nlmsg->nlmsghdr.nlmsg_flags =
+ nlmsg->nlmsghdr.nlmsg_flags =
NLM_F_REQUEST|NLM_F_CREATE|NLM_F_EXCL|NLM_F_ACK;
nlmsg->nlmsghdr.nlmsg_type = RTM_NEWLINK;
- nest1 = nla_begin_nested(nlmsg, IFLA_LINKINFO);
+ nest1 = nla_begin_nested(nlmsg, IFLA_LINKINFO);
if (!nest1)
goto out;
NLM_F_REQUEST|NLM_F_CREATE|NLM_F_EXCL|NLM_F_ACK;
nlmsg->nlmsghdr.nlmsg_type = RTM_NEWLINK;
- nest = nla_begin_nested(nlmsg, IFLA_LINKINFO);
+ nest = nla_begin_nested(nlmsg, IFLA_LINKINFO);
if (!nest)
goto err1;
NLM_F_REQUEST|NLM_F_CREATE|NLM_F_EXCL|NLM_F_ACK;
nlmsg->nlmsghdr.nlmsg_type = RTM_NEWLINK;
- nest = nla_begin_nested(nlmsg, IFLA_LINKINFO);
+ nest = nla_begin_nested(nlmsg, IFLA_LINKINFO);
if (!nest)
goto out;
if (family != AF_INET && family != AF_INET6)
return -1;
- snprintf(path, MAXPATHLEN, "/proc/sys/net/%s/conf/%s/forwarding",
+ snprintf(path, MAXPATHLEN, "/proc/sys/net/%s/conf/%s/forwarding",
family == AF_INET?"ipv4":"ipv6" , ifname);
return proc_sys_net_write(path, flag?"1":"0");
if (family != AF_INET && family != AF_INET6)
return -1;
- sprintf(path, "/proc/sys/net/%s/conf/%s/%s",
- family == AF_INET?"ipv4":"ipv6" , ifname,
+ sprintf(path, "/proc/sys/net/%s/conf/%s/%s",
+ family == AF_INET?"ipv4":"ipv6" , ifname,
family == AF_INET?"proxy_arp":"proxy_ndp");
return proc_sys_net_write(path, flag?"1":"0");
if (nla_put_buffer(nlmsg, IFA_ADDRESS, addr, addrlen))
goto out;
-/* if (in_bcast.s_addr != INADDR_ANY) */
-/* if (nla_put_buffer(nlmsg, IFA_BROADCAST, &in_bcast, */
-/* sizeof(in_bcast))) */
-/* goto out; */
+/* if (in_bcast.s_addr != INADDR_ANY) */
+/* if (nla_put_buffer(nlmsg, IFA_BROADCAST, &in_bcast, */
+/* sizeof(in_bcast))) */
+/* goto out; */
if (netlink_transaction(&nlh, nlmsg, answer))
goto out;
return err;
}
-static int bridge_add_del_interface(const char *bridge,
+static int bridge_add_del_interface(const char *bridge,
const char *ifname, int detach)
{
int fd, index, err;