[Xorp-hackers] [PATCH 1/2] xorp: fea: data_plane: ifconfig: Check if we can set destination address for vif(IPv6)

Ben Greear greearb at candelatech.com
Fri Mar 23 09:19:04 PDT 2012


On 03/23/2012 09:03 AM, igorm at etf.rs wrote:
> From: Igor Maravic<igorm at etf.rs>
>
> If our vif on system isn't point-to-point link
> we can't set appropriate destination address. Commit will fail in that case.
>
> Signed-off-by: Igor Maravic<igorm at etf.rs>
> ---
>   xorp/fea/data_plane/ifconfig/ifconfig_set.cc |    9 +++++++++
>   1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/xorp/fea/data_plane/ifconfig/ifconfig_set.cc b/xorp/fea/data_plane/ifconfig/ifconfig_set.cc
> index 046ab3e..75013da 100644
> --- a/xorp/fea/data_plane/ifconfig/ifconfig_set.cc
> +++ b/xorp/fea/data_plane/ifconfig/ifconfig_set.cc
> @@ -706,6 +706,15 @@ IfConfigSet::push_vif_address(const IfTreeInterface*	system_ifp,
>   	is_add = false;
>       }
>
> +    if (system_vifp != NULL) {
> +	if (system_vifp->point_to_point() != config_addr.point_to_point()) {

Should this check be something more like:

if (config_addr.point_to_point() && !system_vifp->point_to_point()) {

?

Looks like you changed this exact code in the next patch?

Thanks,
Ben

> +	    error_msg = c_format("Can't set destination address for if: %s vif: %s"
> +		    "because it isn't point-to-point interface\n",
> +		    system_ifp->ifname().c_str(), system_vifp->vifname().c_str());
> +	    goto done;
> +	}
> +    }
> +
>       //
>       // XXX: For whatever reason a prefix length of zero does not cut it, so
>       // initialize prefix to 64. This is exactly what ifconfig(8) does.


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list