Skip to content

Commit

Permalink
xfrm: add severity to printk
Browse files Browse the repository at this point in the history
Serious oh sh*t messages converted to WARN().
Add KERN_NOTICE severity to the unknown policy type messages.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
stephen hemminger authored and David S. Miller committed May 18, 2010
1 parent 6ff9c36 commit 62db5cf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1783,7 +1783,7 @@ static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh,

} else {
// reset the timers here?
printk("Dont know what to do with soft policy expire\n");
WARN(1, "Dont know what to do with soft policy expire\n");
}
km_policy_expired(xp, p->dir, up->hard, current->pid);

Expand Down Expand Up @@ -1883,7 +1883,7 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh,
return 0;

bad_policy:
printk("BAD policy passed\n");
WARN(1, "BAD policy passed\n");
free_state:
kfree(x);
nomem:
Expand Down Expand Up @@ -2385,8 +2385,9 @@ static int xfrm_send_state_notify(struct xfrm_state *x, struct km_event *c)
case XFRM_MSG_FLUSHSA:
return xfrm_notify_sa_flush(c);
default:
printk("xfrm_user: Unknown SA event %d\n", c->event);
break;
printk(KERN_NOTICE "xfrm_user: Unknown SA event %d\n",
c->event);
break;
}

return 0;
Expand Down Expand Up @@ -2676,7 +2677,8 @@ static int xfrm_send_policy_notify(struct xfrm_policy *xp, int dir, struct km_ev
case XFRM_MSG_POLEXPIRE:
return xfrm_exp_policy_notify(xp, dir, c);
default:
printk("xfrm_user: Unknown Policy event %d\n", c->event);
printk(KERN_NOTICE "xfrm_user: Unknown Policy event %d\n",
c->event);
}

return 0;
Expand Down

0 comments on commit 62db5cf

Please sign in to comment.