[libvirt] [PATCH v3] BSD: implement virNetDev(Set|Clear)IPv4Address

Eric Blake eblake at redhat.com
Wed Aug 21 22:21:20 UTC 2013


On 08/11/2013 07:54 AM, Roman Bogorodskiy wrote:
> Provide an implementation of virNetDev(Set|Clear)IPv4Address based on
> BSD ifconfig tool in addition to 'ip' from Linux iproute2 package.
> ---
>  configure.ac         | 15 +++++++++++++++
>  src/util/virnetdev.c | 24 ++++++++++++++++++++++++
>  2 files changed, 39 insertions(+)
> 

>  
>  if test $with_freebsd = yes; then
> +   want_ifconfig=yes
> +
>     with_firewalld=no
>  fi
>  
> @@ -2429,6 +2435,15 @@ AC_CHECK_DECLS([BRDGSFD, BRDGADD, BRDGDEL],
>                  #include <net/if_bridgevar.h>
>                 ])
>  
> +# Check if we need to look for ifconfig
> +if test "$want_ifconfig" = "yes"; then
> +     AC_PATH_PROG([IFCONFIG_PATH], [ifconfig])
> +     if test -z "$IFCONFIG_PATH"; then
> +         AC_MSG_ERROR([Failed to find ifconfig.])

This means that configure will fail if ifconfig is not installed but
want_ifconfig was set.  Are you certain enough that FreeBSD is likely to
have ifconfig by default, and thus not hit this failure except on
extremely unlikely configurations?

But I think it looks simple enough, with minimal risk of causing grief
on non-BSD systems (the configure check is guarded, so IFCONFIG_PATH is
likely to be unset on other platforms).  ACK and pushed.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130821/54f372d0/attachment-0001.sig>


More information about the libvir-list mailing list