summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/main.c
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2017-03-28 08:38:05 +0000
committerdimitri staessens <[email protected]>2017-03-28 08:38:05 +0000
commitba13c05b8b61365ff9e969c15affd2e1d52b76ed (patch)
treebaa5d6178914dd12106845ca81c81b63e4249c6f /src/ipcpd/normal/main.c
parent7ee6dadd39f3d4b5874d23bfcdcdd66eb195124e (diff)
parent6d080d9b9ee2e480717935e4ce94870fc87ea5f7 (diff)
downloadouroboros-ba13c05b8b61365ff9e969c15affd2e1d52b76ed.tar.gz
ouroboros-ba13c05b8b61365ff9e969c15affd2e1d52b76ed.zip
Merged in sandervrijders/ouroboros/be-upd-graph (pull request #426)
Be upd graph
Diffstat (limited to 'src/ipcpd/normal/main.c')
-rw-r--r--src/ipcpd/normal/main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c
index 41e0544d..ef7f07cf 100644
--- a/src/ipcpd/normal/main.c
+++ b/src/ipcpd/normal/main.c
@@ -85,6 +85,7 @@ static int boot_components(void)
char buf[256];
ssize_t len;
enum pol_addr_auth pa;
+ char path[RIB_MAX_PATH_LEN + 1];
len = rib_read(DIF_PATH, &buf, 256);
if (len < 0) {
@@ -108,7 +109,6 @@ static int boot_components(void)
if (rib_read(BOOT_PATH "/addr_auth/type", &pa, sizeof(pa))
!= sizeof(pa)) {
log_err("Failed to read policy for address authority.");
- connmgr_fini();
return -1;
}
@@ -124,6 +124,14 @@ static int boot_components(void)
return -1;
}
+ path[0] = '\0';
+ rib_path_append(rib_path_append(path, MEMBERS_NAME), ipcpi.name);
+ if (rib_write(path, &ipcpi.dt_addr, sizeof(&ipcpi.dt_addr))) {
+ log_err("Failed to write address to member object.");
+ addr_auth_fini();
+ return -1;
+ }
+
log_dbg("IPCP got address %" PRIu64 ".", ipcpi.dt_addr);
log_dbg("Starting ribmgr.");
@@ -342,6 +350,9 @@ static int normal_ipcp_bootstrap(struct dif_config * conf)
rib_write(BOOT_PATH "/dt/const/seqno_size",
&conf->seqno_size,
sizeof(conf->seqno_size)) ||
+ rib_write(BOOT_PATH "/dt/const/pdu_length_size",
+ &conf->pdu_length_size,
+ sizeof(conf->pdu_length_size)) ||
rib_write(BOOT_PATH "/dt/const/has_ttl",
&conf->has_ttl,
sizeof(conf->has_ttl)) ||