Minor fixes from Masahide for XFRM dynamic keying
diff --git a/ip/xfrm_monitor.c b/ip/xfrm_monitor.c
index f590428..153621f 100644
--- a/ip/xfrm_monitor.c
+++ b/ip/xfrm_monitor.c
@@ -103,6 +103,7 @@
if (oneline)
fprintf(fp, "\n");
+ fflush(fp);
return 0;
}
@@ -116,14 +117,16 @@
print_timestamp(fp);
if (n->nlmsg_type == XFRM_MSG_NEWSA ||
- n->nlmsg_type == XFRM_MSG_DELSA ||
- n->nlmsg_type == XFRM_MSG_UPDSA) {
+ n->nlmsg_type == XFRM_MSG_DELSA ||
+ n->nlmsg_type == XFRM_MSG_UPDSA ||
+ n->nlmsg_type == XFRM_MSG_EXPIRE) {
xfrm_state_print(who, n, arg);
return 0;
}
if (n->nlmsg_type == XFRM_MSG_NEWPOLICY ||
- n->nlmsg_type == XFRM_MSG_DELPOLICY ||
- n->nlmsg_type == XFRM_MSG_UPDPOLICY) {
+ n->nlmsg_type == XFRM_MSG_DELPOLICY ||
+ n->nlmsg_type == XFRM_MSG_UPDPOLICY ||
+ n->nlmsg_type == XFRM_MSG_POLEXPIRE) {
xfrm_policy_print(who, n, arg);
return 0;
}
@@ -132,14 +135,6 @@
xfrm_acquire_print(who, n, arg);
return 0;
}
- if (n->nlmsg_type == XFRM_MSG_EXPIRE) {
- xfrm_state_print(who, n, arg);
- return 0;
- }
- if (n->nlmsg_type == XFRM_MSG_POLEXPIRE) {
- xfrm_policy_print(who, n, arg);
- return 0;
- }
if (n->nlmsg_type == XFRM_MSG_FLUSHSA) {
/* XXX: Todo: show proto in xfrm_usersa_flush */
fprintf(fp, "Flushed state\n");