Subject: Re: [Vpn-failover] [RFC] IPSEC failover - Netlink part

From: Ulrich Weber <[email-masked]>
Date: Tue, 09 Nov 2004 09:55:05 +0100

|> |> +    NLMSG_LENGTH(sizeof(struct xfrm_usersa_id)),/* UPD SEQ */
|> |>
|> |>
|> | ^^ what about struct xfrm_replay_state ?
|> it's attached as rt attribute, so it should be ok.
|
| But you don't check it's size. You need to include it here or check it
| when you use it.
ok i added the following checkt to ensure the right size.

If i add the size of the xfrm_replay_state struct to the above array, the rt
attribute macros wouldnt work anymore.

Cheers
~ Ulrich

- ----
struct rtattr *rt = xfrma[XFRMA_REPLAY-1];

if( xfrma[XFRMA_REPLAY-1] && (rt->rta_len == (sizeof(struct
xfrm_replay_state) + sizeof(struct rtattr)))) {