Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75129
b: refs/heads/master
c: f398035
h: refs/heads/master
i:
  75127: ed60416
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Dec 20, 2007
1 parent 8a5d2bc commit 3a24d2a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e0260feddf8a68301c75cdfff9ec251d5851b006
refs/heads/master: f398035f2dec0a6150833b0bc105057953594edb
14 changes: 12 additions & 2 deletions trunk/net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -2784,12 +2784,22 @@ static struct sadb_msg *pfkey_get_base_msg(struct sk_buff *skb, int *errp)

static inline int aalg_tmpl_set(struct xfrm_tmpl *t, struct xfrm_algo_desc *d)
{
return t->aalgos & (1 << d->desc.sadb_alg_id);
unsigned int id = d->desc.sadb_alg_id;

if (id >= sizeof(t->aalgos) * 8)
return 0;

return (t->aalgos >> id) & 1;
}

static inline int ealg_tmpl_set(struct xfrm_tmpl *t, struct xfrm_algo_desc *d)
{
return t->ealgos & (1 << d->desc.sadb_alg_id);
unsigned int id = d->desc.sadb_alg_id;

if (id >= sizeof(t->ealgos) * 8)
return 0;

return (t->ealgos >> id) & 1;
}

static int count_ah_combs(struct xfrm_tmpl *t)
Expand Down

0 comments on commit 3a24d2a

Please sign in to comment.