[XFRM] xfrm_user: Better validation of user templates.
authorDavid S. Miller <davem@sunset.davemloft.net>
Mon, 4 Dec 2006 03:19:26 +0000 (19:19 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 4 Dec 2006 03:19:26 +0000 (19:19 -0800)
commitb4ad86bf52469b26148c677cb59d8bc81f129cc2
treecca839f49a02ced2dd79c559e57beabd74fe0216
parent2b5f6dcce5bf94b9b119e9ed8d537098ec61c3d2
[XFRM] xfrm_user: Better validation of user templates.

Since we never checked the ->family value of templates
before, many applications simply leave it at zero.
Detect this and fix it up to be the pol->family value.

Also, do not clobber xp->family while reading in templates,
that is not necessary.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_user.c