> >>   http://cr.opensolaris.org/~danmcd/6777776/
 > >
 > > ipsecesp.c would hit an assertion failure if you were to run this, because 
 > > db_type can't be both a M_CTL and an M_DATA.
 > >
 > > 2307         ASSERT(ipsec_mp->b_datap->db_type == M_CTL);
 > > 2308         ASSERT(io->ipsec_out_type == IPSEC_OUT);
 > > 2309         ASSERT(ipsec_mp->b_cont != NULL);
 > > 2310         ASSERT(ipsec_mp->b_datap->db_type == M_DATA);
 > 
 > Doh!  Forgot the ->b_cont...
 > 
 >      ASSERT(ipsec_mp->b_datap->db_type == M_CTL);
 >      ASSERT(io->ipsec_out_type == IPSEC_OUT);
 >      ASSERT(ipsec_mp->b_cont != NULL);
 >      ASSERT(ipsec_mp->b_cont->b_datap->db_type == M_DATA);
 > 
 > That's what I meant to say.

Using the DB_TYPE() macro would make this a bit less error-prone.

-- 
meem
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to