提交 62db5cfd 编写于 作者: S stephen hemminger 提交者: David S. Miller

xfrm: add severity to printk

Serious oh sh*t messages converted to WARN().
Add KERN_NOTICE severity to the unknown policy type messages.
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6ff9c364
...@@ -1783,7 +1783,7 @@ static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh, ...@@ -1783,7 +1783,7 @@ static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh,
} else { } else {
// reset the timers here? // 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); km_policy_expired(xp, p->dir, up->hard, current->pid);
...@@ -1883,7 +1883,7 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh, ...@@ -1883,7 +1883,7 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh,
return 0; return 0;
bad_policy: bad_policy:
printk("BAD policy passed\n"); WARN(1, "BAD policy passed\n");
free_state: free_state:
kfree(x); kfree(x);
nomem: nomem:
...@@ -2385,7 +2385,8 @@ static int xfrm_send_state_notify(struct xfrm_state *x, struct km_event *c) ...@@ -2385,7 +2385,8 @@ static int xfrm_send_state_notify(struct xfrm_state *x, struct km_event *c)
case XFRM_MSG_FLUSHSA: case XFRM_MSG_FLUSHSA:
return xfrm_notify_sa_flush(c); return xfrm_notify_sa_flush(c);
default: default:
printk("xfrm_user: Unknown SA event %d\n", c->event); printk(KERN_NOTICE "xfrm_user: Unknown SA event %d\n",
c->event);
break; break;
} }
...@@ -2676,7 +2677,8 @@ static int xfrm_send_policy_notify(struct xfrm_policy *xp, int dir, struct km_ev ...@@ -2676,7 +2677,8 @@ static int xfrm_send_policy_notify(struct xfrm_policy *xp, int dir, struct km_ev
case XFRM_MSG_POLEXPIRE: case XFRM_MSG_POLEXPIRE:
return xfrm_exp_policy_notify(xp, dir, c); return xfrm_exp_policy_notify(xp, dir, c);
default: 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; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册