On Thu, Nov 29, 2007 at 09:32:02AM -0800, Andrew Morton wrote: > > > diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c > > index b702bd8..9a4cf2e 100644 > > --- a/net/xfrm/xfrm_policy.c > > +++ b/net/xfrm/xfrm_policy.c > > @@ -1344,6 +1344,7 @@ restart: > > xfrm_nr += pols[0]->xfrm_nr; > > > > switch (policy->action) { > > + default: > > case XFRM_POLICY_BLOCK: > > /* Prohibit the flow */ > > err = -EPERM; > > hm. If someone feeds a bad value into here we want to know about it rather > than silently fixing it up, don't we?
As I said, we already check all policy actions when they enter the kernel from user-space. For example, in xfrm_user we make sure that action is one of these values. So this is mainly to shut gcc up. Even if we did somehow get an illegal value through, dropping the packet sounds like a sane action to follow and I'm sure people will notice pretty quickly when packets don't flow anymore :) Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html