added brackets; fprintf was erroneously not guarded by if statement

Change-Id: I2e8c365ee261bde998a69f0f3531dfe6f3ec49c7
This commit is contained in:
wbokslag 2022-07-11 14:29:43 +02:00
parent 8ab1283296
commit 627959b4ba
1 changed files with 2 additions and 1 deletions

View File

@ -92,9 +92,10 @@ static int tllc_defrag_out(struct tllc_state *llcs,
msg->l3h = msg->data;
rx_tl_sdu(msg, msgb_l3len(msg));
if (tun_fd < 0)
if (tun_fd < 0) {
tun_fd = tun_alloc("tun0");
fprintf(stderr, "tun_fd=%d\n", tun_fd);
}
if (tun_fd >= 0) {
uint8_t buf[4096];
int len = osmo_ubit2pbit(buf, msg->l3h+3+4+4+4+4, msgb_l3len(msg)-3-4-4-4-4);