Revert "Make ip utility veth driver aware"
Subsystems (2)
PATCH 1/4 Revert "Make ip utility veth driver aware"
Stephen it looks like you weren't cc'd on the latest version of the veth support. So this patchset first reverts the old version of the veth support you merged. Then merges a tested version of the veth support.
This reverts commit 4ed390ce43d1ec7c881721f312260df901d8390d.
Conflicts:
ip/ip.c --- ip/Makefile | 2 +- ip/ip.c | 4 +- ip/veth.c | 196 ----------------------------------------------------------- ip/veth.h | 17 ----- 4 files changed, 2 insertions(+), 217 deletions(-) delete mode 100644 ip/veth.c delete mode 100644 ip/veth.h
ip/Makefile +1 -1
@@ -1,7 +1,7 @@ IPOBJ=ip.o ipaddress.o iproute.o iprule.o \ rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \ ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o \ - ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o veth.o + ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o RTMONOBJ=rtmon.o
ip/ip.c +1 -3
@@ -27,7 +27,6 @@#include "SNAPSHOT.h" #include "utils.h" #include "ip_common.h" -#include "veth.h" int preferred_family =AF_UNSPEC ;int show_stats =0 ;
@@ -48,7 +47,7 @@ static void usage(void)"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n" " ip [ -force ] [-batch filename\n" "where OBJECT := { link | addr | route | rule | neigh | ntable | tunnel |\n" -" maddr | mroute | monitor | xfrm | veth }\n" +" maddr | mroute | monitor | xfrm }\n" " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n" " -f[amily] { inet | inet6 | ipx | dnet | link } |\n" " -o[neline] | -t[imestamp] }\n");
@@ -78,7 +77,6 @@ static const struct cmd { { "monitor", do_ipmonitor }, { "xfrm", do_xfrm }, { "mroute", do_multiroute }, - { "veth", do_veth }, { "help", do_help }, { 0 } };
ip/veth.c deleted +0 -196
196 lines not on this page · raw message
ip/veth.h deleted +0 -17
@@ -1,17 +0,0 @@ -int do_veth (int argc,char **argv); - -enum { -VETH_CMD_UNSPEC , -VETH_CMD_ADD , -VETH_CMD_DEL , - -VETH_CMD_MAX -}; - -enum { -VETH_ATTR_UNSPEC , -VETH_ATTR_DEVNAME , -VETH_ATTR_PEERNAME , - -VETH_ATTR_MAX -};
Signature · 1 line
1.5.3.rc6.17.g1911
Quoted 2 lines · Eric W. Biederman
Stephen it looks like you weren't cc'd on the latest version of the veth support. So this patchset first reverts the old
He was. The latest version looks completely different from what is reversed in this patch.
Quoted 284 lines
version of the veth support you merged. Then merges a tested version of the veth support.
This reverts commit
4ed390ce43d1ec7c881721f312260df901d8390d.Conflicts:
ip/ip.c --- ip/Makefile | 2 +- ip/ip.c | 4 +- ip/veth.c | 196 ----------------------------------------------------------- ip/veth.h | 17 ----- 4 files changed, 2 insertions(+), 217 deletions(-) delete mode 100644 ip/veth.c delete mode 100644 ip/veth.hip/Makefile +1
-1@@ -1,7 +1,7 @@ IPOBJ=ip.o ipaddress.o iproute.o iprule.o \ rtm_map.o iptunnel.o ip6tunnel.o tunnel.o ipneigh.o ipntable.o iplink.o \ ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o \ - ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o veth.o + ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o RTMONOBJ=rtmon.oip/ip.c +1
-3@@ -27,7 +27,6 @@#include "SNAPSHOT.h" #include "utils.h" #include "ip_common.h" -#include "veth.h" int preferred_family =AF_UNSPEC ;int show_stats =0 ;@@ -48,7 +47,7 @@ static void usage(void)"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n" " ip [ -force ] [-batch filename\n" "where OBJECT := { link | addr | route | rule | neigh | ntable | tunnel |\n" -" maddr | mroute | monitor | xfrm | veth }\n" +" maddr | mroute | monitor | xfrm }\n" " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n" " -f[amily] { inet | inet6 | ipx | dnet | link } |\n" " -o[neline] | -t[imestamp] }\n");@@ -78,7 +77,6 @@ static const struct cmd { { "monitor", do_ipmonitor }, { "xfrm", do_xfrm }, { "mroute", do_multiroute }, - { "veth", do_veth }, { "help", do_help }, { 0 } };ip/veth.c deleted +0
-196@@ -1,196 +0,0 @@ -/* -* veth.c "ethernet tunnel" -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version -* 2 of the License, or (at your option) any later version. -* -* Authors: Pavel Emelianov, <[email protected]> -* -*/ - -#include <stdio.h> -#include <string.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <linux/genetlink.h> - -#include "utils.h" -#include "veth.h" - -#define GENLMSG_DATA (glh) ((void *)(NLMSG_DATA(glh) + GENL_HDRLEN)) -#define NLA_DATA (na) ((void *)((char*)(na) + NLA_HDRLEN)) - -static int do_veth_help (void ) -{ -fprintf (stderr,"Usage: ip veth add DEVICE PEER_NAME\n" ); -fprintf (stderr," del DEVICE\n" ); -exit (-1 ); -} - -static int genl_ctrl_resolve_family (const char *family) -{ -struct rtnl_handle rth; -struct nlmsghdr *nlh; -struct genlmsghdr *ghdr; -int ret =0 ; -struct { -struct nlmsghdr n; -char buf[4096 ]; - } req; - -memset (&req,0 ,sizeof (req)); - - nlh = &req.n; - nlh->nlmsg_len =NLMSG_LENGTH (GENL_HDRLEN ); - nlh->nlmsg_flags =NLM_F_REQUEST |NLM_F_ACK ; - nlh->nlmsg_type =GENL_ID_CTRL ; - - ghdr =NLMSG_DATA (&req.n); - ghdr->cmd =CTRL_CMD_GETFAMILY ; - -if (rtnl_open_byproto (&rth,0 ,NETLINK_GENERIC ) <0 ) { -fprintf (stderr,"Cannot open generic netlink socket\n" ); -exit (1 ); - } - -addattr_l (nlh,128 ,CTRL_ATTR_FAMILY_NAME , family,strlen (family) +1 ); - -if (rtnl_talk (&rth, nlh,0 ,0 , nlh,NULL ,NULL ) <0 ) { -fprintf (stderr,"Error talking to the kernel\n" ); - goto errout; - } - - { -struct rtattr *tb[CTRL_ATTR_MAX +1 ]; -struct genlmsghdr *ghdr =NLMSG_DATA (nlh); -int len = nlh->nlmsg_len; -struct rtattr *attrs; - -if (nlh->nlmsg_type !=GENL_ID_CTRL ) { -fprintf (stderr,"Not a controller message, nlmsg_len=%d " -"nlmsg_type=0x%x\n" , nlh->nlmsg_len, nlh->nlmsg_type); - goto errout; - } - -if (ghdr->cmd !=CTRL_CMD_NEWFAMILY ) { -fprintf (stderr,"Unkown controller command %d\n" , ghdr->cmd); - goto errout; - } - - len -=NLMSG_LENGTH (GENL_HDRLEN ); - -if (len <0 ) { -fprintf (stderr,"wrong controller message len %d\n" , len); -return -1 ; - } - - attrs = (struct rtattr *) ((char *) ghdr +GENL_HDRLEN ); -parse_rtattr (tb,CTRL_ATTR_MAX , attrs, len); - -if (tb[CTRL_ATTR_FAMILY_ID ] ==NULL ) { -fprintf (stderr,"Missing family id TLV\n" ); - goto errout; - } - - ret = *(__u16 *)RTA_DATA (tb[CTRL_ATTR_FAMILY_ID ]); - } - -errout: -rtnl_close (&rth); -return ret; -} - -static int do_veth_operate (char *dev,char *peer,int cmd) -{ -struct rtnl_handle rth; -struct nlmsghdr *nlh; -struct genlmsghdr *ghdr; -struct nlattr *attr; -struct { -struct nlmsghdr n; -struct genlmsghdr h; -char bug[1024 ]; - } req; -int family, len; -int err =0 ; - - family =genl_ctrl_resolve_family ("veth" ); -if (family ==0 ) { -fprintf (stderr,"veth: Can't resolve family\n" ); -exit (1 ); - } - -if (rtnl_open_byproto (&rth,0 ,NETLINK_GENERIC ) <0 ) -exit (1 ); - - nlh = &req.n; - nlh->nlmsg_len =NLMSG_LENGTH (GENL_HDRLEN ); - nlh->nlmsg_flags =NLM_F_REQUEST ; - nlh->nlmsg_type = family; - nlh->nlmsg_seq =0 ; - - ghdr = &req.h; - ghdr->cmd = cmd; - - attr = (struct nlattr *)GENLMSG_DATA (&req); - len =strlen (dev); - attr->nla_type =VETH_ATTR_DEVNAME ; - attr->nla_len = len +1 +NLA_HDRLEN ; -memcpy (NLA_DATA (attr), dev, len); - nlh->nlmsg_len +=NLMSG_ALIGN (attr->nla_len); - -if (peer) { - attr = (struct nlattr *)((char *)attr + -NLMSG_ALIGN (attr->nla_len)); - len =strlen (peer); - attr->nla_type =VETH_ATTR_PEERNAME ; - attr->nla_len = len +1 +NLA_HDRLEN ; -memcpy (NLA_DATA (attr), peer, len); - nlh->nlmsg_len +=NLMSG_ALIGN (attr->nla_len); - } - -if (rtnl_send (&rth, (char *) &req, nlh->nlmsg_len) <0 ) { - err =-1 ; -fprintf (stderr,"Error talking to the kernel (add)\n" ); - } - -rtnl_close (&rth); -return err; -} - -static int do_veth_add (int argc,char **argv) -{ -if (argc <2 ) -return do_veth_help (); - -return do_veth_operate (argv[0 ], argv[1 ],VETH_CMD_ADD ); -} - -static int do_veth_del (int argc,char **argv) -{ -char *name; - -if (argc <1 ) -return do_veth_help (); - -return do_veth_operate (argv[0 ],NULL ,VETH_CMD_DEL ); -} - -int do_veth (int argc,char **argv) -{ -if (argc ==0 ) -return do_veth_help (); - -if (strcmp (*argv,"add" ) ==0 ||strcmp (*argv,"a" ) ==0 ) -return do_veth_add (argc -1 , argv +1 ); -if (strcmp (*argv,"del" ) ==0 ||strcmp (*argv,"d" ) ==0 ) -return do_veth_del (argc -1 , argv +1 ); -if (strcmp (*argv,"help" ) ==0 ) -return do_veth_help (); - -fprintf (stderr,"Command \"%s\" is unknown, try \"ip veth help\".\n" , *argv); -exit (-1 ); -}ip/veth.h deleted +0
-17@@ -1,17 +0,0 @@ -int do_veth (int argc,char **argv); - -enum { -VETH_CMD_UNSPEC , -VETH_CMD_ADD , -VETH_CMD_DEL , - -VETH_CMD_MAX -}; - -enum { -VETH_ATTR_UNSPEC , -VETH_ATTR_DEVNAME , -VETH_ATTR_PEERNAME , - -VETH_ATTR_MAX -};
Quoted 6 lines · Pavel Emelyanov
Quoted 2 lines · Eric W. Biederman
Stephen it looks like you weren't cc'd on the latest version of the veth support. So this patchset first reverts the old
He was. The latest version looks completely different from what is reversed in this patch.
This is against the latest snapshot I could find. My apologies if I missed some of the communication.
Eric
Quoted 11 lines · [email protected] (Eric W. Biederman) writes:
Quoted 6 lines · Pavel Emelyanov
Quoted 2 lines · Eric W. Biederman
Stephen it looks like you weren't cc'd on the latest version of the veth support. So this patchset first reverts the old
He was. The latest version looks completely different from what is reversed in this patch.
This is against the latest snapshot I could find. My apologies if I missed some of the communication.
I was working against:git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
And the last I could find of the conversation about veth support was in the thread announcing iproute-2-2.6.23-rc3, and Stephen Hemminger asking for the latest version of the veth support to be sent on Sept 1st.
So it is quite possible this has been resolved in private email, and nothing public has been updated yet.
I just don't have a copy of anything newer, and I don't know where else I would look for something newer. So since I'm starting to use veth I sent the patches I had to make it work.
The last round of veth support for iproute2 I could find was sent on the 19th of July and David Miller, Patrick McHardy, and netdev were copied but Stephen Hemminger wasn't. Which is where my assertion that Stephen hadn't been sent the latest version came from.
If you guys have already sorted this out and I just can't find the code I'm overjoyed. Otherwise the patches I sent should be enough to get things sorted out, if I have figure out the current state of confusion.
Eric
PATCH 2/6 Introduce iplink_parse() routine
In reply to Eric W. BiedermanFrom: Pavel Emelyanov <[email protected]>
Date: Thu, 19 Jul 2007 13:32:31 +0400
This routine parses CLI attributes, describing generic link parameters such as name, address, etc.
This is mostly copy-pasted from iplink_modify().
--- include/utils.h | 3 + ip/iplink.c | 127 +++++++++++++++++++++++++++++++----------------------- 2 files changed, 76 insertions(+), 54 deletions(-)
include/utils.h +3 -0
@@ -146,4 +146,7 @@ extern int cmdlineno;extern size_t getcmdline (char **line,size_t *len,FILE *in);extern int makeargs (char *line,char *argv[],int maxargs); +struct iplink_req ; +int iplink_parse (int argc,char **argv,struct iplink_req *req, +char **name,char **type,char **link,char **dev);#endif /* __UTILS_H__ */
ip/iplink.c +73 -54
213 lines not on this page · raw message
Signature · 1 line
1.5.3.rc6.17.g1911
PATCH 3/4 Module for ip utility to support veth device
From: Pavel Emelyanov <[email protected]>
Date: Thu, 19 Jul 2007 13:33:56 +0400
The link_veth.so itself.
--- ip/Makefile | 6 ++++- ip/link_veth.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ip/veth.h | 12 ++++++++++ 3 files changed, 80 insertions(+), 1 deletions(-) create mode 100644 ip/link_veth.c create mode 100644 ip/veth.h
ip/Makefile +5 -1
@@ -8,8 +8,9 @@ RTMONOBJ=rtmon.o ALLOBJ=$(IPOBJ) $(RTMONOBJ) SCRIPTS=ifcfg rtpr routel routef TARGETS=ip rtmon +LIBS=link_veth.so -all: $(TARGETS) $(SCRIPTS) +all: $(TARGETS) $(SCRIPTS) $(LIBS) ip: $(IPOBJ) $(LIBNETLINK) $(LIBUTIL)
@@ -24,3 +25,6 @@ clean: LDLIBS += -ldl LDFLAGS += -Wl,-export-dynamic + +%.so: %.c + $(CC) $(CFLAGS) -shared $< -o $@
ip/link_veth.c new file +63 -0
63 lines not on this page · raw message
ip/veth.h new file +12 -0
@@ -0,0 +1,12 @@ +#ifndef __NET_VETH_H__ +#define __NET_VETH_H__ + +enum { +VETH_INFO_UNSPEC , +VETH_INFO_PEER , + + __VETH_INFO_MAX +#define VETH_INFO_MAX (__VETH_INFO_MAX - 1) +}; + +#endif
Signature · 1 line
1.5.3.rc6.17.g1911
PATCH 4/4 iproute2: link_veth support bug fixes.
From: Eric W. Biederman <[email protected]>
Date: Sat, 8 Sep 2007 10:17:43 -0600
This patch contains small compile and implementation bug fixes for link_veth.c.
The compile fixes stop trying to build a shared object when we can just as easily compile the code in. Making support of non arch/i386 architectures easier.
The documentation is fixed to not document the previous version of the veth support.
The code is to initialize it's pointers before calling iplink_parse, and we now set name = dev if name is not passed.
--- ip/Makefile | 8 +++----- ip/link_veth.c | 12 +++++++++--- 2 files changed, 12 insertions(+), 8 deletions(-)
ip/Makefile +3 -5
@@ -3,14 +3,15 @@ IPOBJ=ip.o ipaddress.o iproute.o iprule.o \ ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o \ ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o +IPOBJ += link_veth.o + RTMONOBJ=rtmon.o ALLOBJ=$(IPOBJ) $(RTMONOBJ) SCRIPTS=ifcfg rtpr routel routef TARGETS=ip rtmon -LIBS=link_veth.so -all: $(TARGETS) $(SCRIPTS) $(LIBS) +all: $(TARGETS) $(SCRIPTS) ip: $(IPOBJ) $(LIBNETLINK) $(LIBUTIL)
@@ -25,6 +26,3 @@ clean: LDLIBS += -ldl LDFLAGS += -Wl,-export-dynamic - -%.so: %.c - $(CC) $(CFLAGS) -shared $< -o $@
ip/link_veth.c +9 -3
@@ -20,14 +20,16 @@static void usage (void ) { -printf ("Usage: ip link add ... type veth " -"[peer <peer-name>] [mac <mac>] [peer_mac <mac>]\n" ); +printf ("Usage: ip link add ... type veth peer { ... }\n" ); }static int veth_parse_opt (struct link_util *lu,int argc,char **argv,struct nlmsghdr *hdr) { -char *name, *type, *link, *dev; +char *dev =NULL ; +char *name =NULL ; +char *link =NULL ; +char *type =NULL ;int err, len;struct rtattr * data;
@@ -46,6 +48,10 @@ static int veth_parse_opt(struct link_util *lu, int argc, char **argv,if (err <0 )return err; +/* Allow "ip link add dev" and "ip link add name" */ +if (!name) + name = dev; +if (name) { len =strlen (name) +1 ;if (len >IFNAMSIZ )
Signature · 1 line
1.5.3.rc6.17.g1911
PATCH 1/1 Basic documentation for dynamic link creation/destruction.
This updates the usage to indicate that we have support link creation and destruction in addition to just setting link parameters.
It's not really great documentation of the new netlink support for link creations and removal but it is a start.
--- ip/iplink.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
ip/iplink.c +5 -2
@@ -38,7 +38,8 @@ static void usage(void) __attribute__((noreturn));void iplink_usage (void ) { -fprintf (stderr,"Usage: ip link set DEVICE { up | down |\n" ); +fprintf (stderr,"Usage: ip link { set | add | replace | delete } DEVICE {\n" ); +fprintf (stderr," up | down |\n" );fprintf (stderr," arp { on | off } |\n" );fprintf (stderr," dynamic { on | off } |\n" );fprintf (stderr," multicast { on | off } |\n" );
@@ -48,7 +49,9 @@ void iplink_usage(void)fprintf (stderr," txqueuelen PACKETS |\n" );fprintf (stderr," name NEWNAME |\n" );fprintf (stderr," address LLADDR | broadcast LLADDR |\n" ); -fprintf (stderr," mtu MTU }\n" ); +fprintf (stderr," mtu MTU | \n" ); +fprintf (stderr," type TYPE [ TYPE specifc options]\n" ); +fprintf (stderr," }\n" );fprintf (stderr," ip link show [ DEVICE ]\n" );exit (-1 ); }
Signature · 1 line
1.5.3.rc6.17.g1911
PATCH 1/1 Add support for moving links between network namespaces
This adds support for setting the IFLA_NET_NS_PID attribute on links allowing them to be moved between network namespaces.
--- include/linux/if_link.h | 1 + ip/iplink.c | 9 +++++++++ 2 files changed, 10 insertions(+), 0 deletions(-)
include/linux/if_link.h +1 -0
@@ -78,6 +78,7 @@ enum IFLA_LINKMODE, IFLA_LINKINFO,#define IFLA_LINKINFO IFLA_LINKINFO + IFLA_NET_NS_PID, __IFLA_MAX };
ip/iplink.c +9 -0
@@ -158,6 +158,7 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,char abuf[32 ];int qlen =-1 ;int mtu =-1 ; +pid_t netns_pid =-1 ; ret = argc;
@@ -255,6 +256,14 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req, } elsereturn on_off ("dynamic" );#endif + }else if (matches (*argv,"netnspid" ) ==0 ) { +NEXT_ARG (); +if (netns_pid !=-1 ) +duparg ("netnspid" , *argv); +if (get_integer (&netns_pid, *argv,0 )) +invarg ("Invalid \"netnspid\" value\n" , *argv); +addattr_l (&req->n,sizeof (*req),IFLA_NET_NS_PID , + &netns_pid,sizeof (netns_pid)); }else if (matches (*argv,"type" ) ==0 ) {NEXT_ARG (); *type = *argv;
Signature · 1 line
1.5.3.rc6.17.g1911
Re: [PATCH] [IPROUTE2] Add support for moving links between network namespaces
Quoted 9 lines · On Wed, 12 Sep 2007 07:05:42 -0600 [email protected] (Eric W. Biederman)…
This adds support for setting the
IFLA_NET_NS_PIDattribute on links allowing them to be moved between network namespaces.Signed-off-by Eric W. Biederman <[email protected]>--- include/linux/if_link.h | 1 + ip/iplink.c | 9 +++++++++ 2 files changed, 10 insertions(+), 0 deletions(-)
Please don't mix header file updates with command changes. As a first step, I always install standard kernel santized headers.
Re: [PATCH] [IPROUTE2] Add support for moving links between network namespaces
Quoted 7 lines · Stephen Hemminger
Quoted 4 lines · On Wed, 12 Sep 2007 07:05:42 -0600 [email protected] (Eric W. Biederman)…
This adds support for setting the
IFLA_NET_NS_PIDattribute on links allowing them to be moved between network namespaces.
Quoted 8 lines
Quoted 5 lines
Signed-off-by Eric W. Biederman <[email protected]>--- include/linux/if_link.h | 1 + ip/iplink.c | 9 +++++++++ 2 files changed, 10 insertions(+), 0 deletions(-)Please don't mix header file updates with command changes. As a first step, I always install standard kernel santized headers.
Sorry I didn't know. Those changes are now in net-2.6.24 so installing sanitized headers should not change anything.
In please feel free to drop the if_link.h part, and if you want I can resend that patch with those few lines deleted.
Eric
Re: [PATCH] [IPROUTE2] Add support for moving links between network namespaces
Quoted 18 lines · On Wed, 12 Sep 2007 08:06:08 -0600 [email protected] (Eric W. Biederman)…
Quoted 7 lines · Stephen Hemminger
Quoted 4 lines · On Wed, 12 Sep 2007 07:05:42 -0600 [email protected] (Eric W. Biederman)…
This adds support for setting the
IFLA_NET_NS_PIDattribute on links allowing them to be moved between network namespaces.Quoted 8 lines
Quoted 5 lines
Signed-off-by Eric W. Biederman <[email protected]>--- include/linux/if_link.h | 1 + ip/iplink.c | 9 +++++++++ 2 files changed, 10 insertions(+), 0 deletions(-)Please don't mix header file updates with command changes. As a first step, I always install standard kernel santized headers.
Quoted 7 lines
Sorry I didn't know. Those changes are now in net-2.6.24 so installing sanitized headers should not change anything.
In please feel free to drop the
if_link.hpart, and if you want I can resend that patch with those few lines deleted.Eric
I take care of fixing patches (as long as they aren't really damaged).
Re: [PATCH 4/4] [IPROUTE2] iproute2: link_veth support bug fixes.
In reply to Eric W. Biederman[snip]
ip/Makefile clean: · line 30
Quoted 7 lines
ip/Makefile +0
-3@@ -25,6 +26,3 @@ clean: LDLIBS += -ldl LDFLAGS += -Wl,-export-dynamic - -%.so: %.c - $(CC) $(CFLAGS) -shared $< -o $@
%) How do we get the .so file then?
Re: [PATCH 4/4] [IPROUTE2] iproute2: link_veth support bug fixes.
Quoted 11 lines · Pavel Emelyanov
[snip]
ip/Makefile clean: · line 30
Quoted 7 lines
ip/Makefile +0
-3@@ -25,6 +26,3 @@ clean: LDLIBS += -ldl LDFLAGS += -Wl,-export-dynamic - -%.so: %.c - $(CC) $(CFLAGS) -shared $< -o $@%) How do we get the .so file then?
The code was built into iproute2, so we don't need the .so file. That rule does not work on arch/x86_64 so I had to do something and the easiest was to simply compile the code in. Like Patrick did with his recent VLAN support.
The usefulness of a .so file seems to be distributing the code outside of /bin/ip. Although I think we currently have some issues with mixed 32bit and 64bit systems because we have "/usr/lib/ip/link_*.so" hard coded.
A .so file always seems to override the compiled in version so I don't think we loose any flexibility on that front.
Eric
Re: [PATCH 4/4] [IPROUTE2] iproute2: link_veth support bug fixes.
Quoted 24 lines · On Wed, 12 Sep 2007 09:13:02 -0600 [email protected] (Eric W. Biederman)…
Quoted 11 lines · Pavel Emelyanov
[snip]
ip/Makefile clean: · line 30
Quoted 7 lines
ip/Makefile +0
-3@@ -25,6 +26,3 @@ clean: LDLIBS += -ldl LDFLAGS += -Wl,-export-dynamic - -%.so: %.c - $(CC) $(CFLAGS) -shared $< -o $@%) How do we get the .so file then?
The code was built into iproute2, so we don't need the .so file. That rule does not work on
arch/x86_64so I had to do something and the easiest was to simply compile the code in. Like Patrick did with his recent VLAN support.The usefulness of a .so file seems to be distributing the code outside of
/bin/ip. Although I think we currently have some issues with mixed 32bit and 64bit systems because we have "/usr/lib/ip/link_*.so" hard coded.
Quoted 4 lines
A .so file always seems to override the compiled in version so I don't think we loose any flexibility on that front.
Eric
Fixing the 64 bit library path is on my to fix list.