Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=04fef9893a1fa5d429522e09bc9591736408f2e8
Commit:     04fef9893a1fa5d429522e09bc9591736408f2e8
Parent:     c5027c9a896fbe05367fb893a274deca5114bfd0
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 5 15:54:39 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Apr 5 15:54:39 2007 -0700

    [XFRM]: beet: use IPOPT_NOP for option padding
    
    draft-nikander-esp-beet-mode-07.txt states "The padding MUST be filled
    with NOP options as defined in Internet Protocol [1] section 3.1
    Internet header format.", so do that.
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/xfrm4_mode_beet.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c
index 16efc66..f8544b7 100644
--- a/net/ipv4/xfrm4_mode_beet.c
+++ b/net/ipv4/xfrm4_mode_beet.c
@@ -54,6 +54,8 @@ static int xfrm4_beet_output(struct xfrm_state *x, struct 
sk_buff *skb)
                ph->padlen = 4 - (optlen & 4);
                ph->hdrlen = (optlen + ph->padlen + sizeof(*ph)) / 8;
                ph->nexthdr = top_iph->protocol;
+               if (ph->padlen)
+                       memset(ph + 1, IPOPT_NOP, ph->padlen);
 
                top_iph->protocol = IPPROTO_BEETPH;
                top_iph->ihl = sizeof(struct iphdr) / 4;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to