summaryrefslogtreecommitdiff
path: root/sysdep/unix
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-11-25 18:42:47 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2013-11-25 18:42:47 +0100
commit283c7dfada53a6dee6a8a17ecab492ffafd44b66 (patch)
tree5edfb9df61c3b625967f3c65317f27c5051a8a4d /sysdep/unix
parent736e143fa50607fcd88132291e96089b899af979 (diff)
parent0bb4e37db317a1290bad24fe430cac6569a9bd8c (diff)
Merge branch 'master' into add-path
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/config.Y4
-rw-r--r--sysdep/unix/krt.c3
-rw-r--r--sysdep/unix/krt.h1
3 files changed, 7 insertions, 1 deletions
diff --git a/sysdep/unix/config.Y b/sysdep/unix/config.Y
index 7bade918..1bba9a0d 100644
--- a/sysdep/unix/config.Y
+++ b/sysdep/unix/config.Y
@@ -14,7 +14,7 @@ CF_HDR
CF_DECLS
CF_KEYWORDS(LOG, SYSLOG, ALL, DEBUG, TRACE, INFO, REMOTE, WARNING, ERROR, AUTH, FATAL, BUG, STDERR, SOFT)
-CF_KEYWORDS(TIMEFORMAT, ISO, SHORT, LONG, BASE, NAME, CONFIRM, UNDO, CHECK, TIMEOUT)
+CF_KEYWORDS(TIMEFORMAT, ISO, OLD, SHORT, LONG, BASE, NAME, CONFIRM, UNDO, CHECK, TIMEOUT)
%type <i> log_mask log_mask_list log_cat cfg_timeout
%type <g> log_file
@@ -96,6 +96,8 @@ timeformat_spec:
| timeformat_which TEXT expr TEXT { *$1 = (struct timeformat){$2, $4, $3}; }
| timeformat_which ISO SHORT { *$1 = (struct timeformat){"%T", "%F", 20*3600}; }
| timeformat_which ISO LONG { *$1 = (struct timeformat){"%F %T", NULL, 0}; }
+ | timeformat_which OLD SHORT { *$1 = (struct timeformat){NULL, NULL, 0}; }
+ | timeformat_which OLD LONG { *$1 = (struct timeformat){"%d-%m-%Y %T", NULL, 0}; }
;
timeformat_base:
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index 3f9e1479..6fdef619 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -159,6 +159,9 @@ kif_choose_primary(struct iface *i)
return a;
}
+ if (a = kif_get_primary_ip(i))
+ return a;
+
return find_preferred_ifa(i, IPA_NONE, IPA_NONE);
}
diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h
index 446914d2..99983ccd 100644
--- a/sysdep/unix/krt.h
+++ b/sysdep/unix/krt.h
@@ -142,5 +142,6 @@ void kif_sys_copy_config(struct kif_config *, struct kif_config *);
void kif_do_scan(struct kif_proto *);
+struct ifa *kif_get_primary_ip(struct iface *i);
#endif