tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ip6_output failed: 65 ? (WAS: Re: Pfs tool and pfsync)
On Wed, Aug 19, 2009 at 10:45:04AM +0200, Manuel Bouyer wrote:
> On Tue, Aug 18, 2009 at 05:43:13PM -0400, Brian A. Seklecki wrote:
> > On Tue, 2009-08-18 at 20:36 +0200, Manuel Bouyer wrote:
> > > Isn't this just EHOSTUNREACH (from sys/ernno.h) ?
> >
> >
> > Two quick ifconfig(8) notes from my testing today:
> >
> > 1) Never manually try to set carpdev on carp(4), it segfaults. It
> > sets the parent interface for you when you assign an IP, based on
> > the subnet.
> >
> > # ifconfig carp123 carpdev pcn0
> > Segmentation fault (core dumped)
>
> Please send-pr for this. carpdev is supposed to work, and IPs on the carp
> and the underlying interface don't have to be in the same subnet.
Looks like I broke it either in the ifconfig(8) overhaul or in some
subsequent change. I have attached a patch for you to try.
Dave
--
David Young OJC Technologies
dyoung%ojctech.com@localhost Urbana, IL * (217) 278-3933
Index: carp.c
===================================================================
RCS file: /cvsroot/src/sbin/ifconfig/carp.c,v
retrieving revision 1.12
diff -p -u -u -p -r1.12 carp.c
--- carp.c 15 Jul 2008 21:27:58 -0000 1.12
+++ carp.c 19 Aug 2009 16:33:12 -0000
@@ -257,18 +257,18 @@ int
setcarpdev(prop_dictionary_t env, prop_dictionary_t oenv)
{
struct carpreq carpr;
- prop_data_t data;
+ prop_string_t s;
- data = (prop_data_t)prop_dictionary_get(env, "carpdev");
- if (data == NULL) {
+ s = (prop_string_t)prop_dictionary_get(env, "carpdev");
+ if (s == NULL) {
errno = ENOENT;
return -1;
}
carp_get(env, &carpr);
- strlcpy(carpr.carpr_carpdev, prop_data_data_nocopy(data),
- MIN(sizeof(carpr.carpr_carpdev), prop_data_size(data)));
+ strlcpy(carpr.carpr_carpdev, prop_string_cstring_nocopy(s),
+ sizeof(carpr.carpr_carpdev));
carp_set(env, &carpr);
return 0;
Home |
Main Index |
Thread Index |
Old Index