--- fwsync/driver/fwsync_workers.c 2022/08/13 18:22:55 1.12 +++ fwsync/driver/fwsync_workers.c 2022/08/18 12:34:00 1.15 @@ -277,6 +277,7 @@ int fwsync_alias_sync(const void *arg, const void *extdata) { struct fws_sndpkt *pkt; + const struct cfg_nat *t = arg; DTRACE(); @@ -294,7 +295,13 @@ fwsync_alias_sync(const void *arg, const void *extdata return EAGAIN; } - // TODO: xxx + printf("%s: pkt=%p t=%p\n", __func__, pkt, t->if_name); + + LIBALIAS_LOCK(t->lib); + AddLink(t->lib, pkt->sp_proto.fws_saddr, pkt->sp_proto.fws_daddr, pkt->sp_proto.fws_aaddr, + pkt->sp_proto.fws_sport, pkt->sp_proto.fws_dport, pkt->sp_proto.fws_aport, + pkt->sp_proto.fws_linktype | LINK_SYNC_MASK); + LIBALIAS_UNLOCK(t->lib); free(pkt, M_FWSYNC); return 0;