if_me.c (62e1a437f3285e785d9b35a476d36a469a90028d) if_me.c (c8ee75f2315e8267ad814dc5b4645ef205f0e0e1)
1/*-
2 * Copyright (c) 2014, 2018 Andrey V. Elsukov <ae@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

--- 389 unchanged lines hidden (view full) ---

398 continue;
399 me_set_running(sc);
400 }
401}
402
403static int
404me_set_tunnel(struct me_softc *sc, in_addr_t src, in_addr_t dst)
405{
1/*-
2 * Copyright (c) 2014, 2018 Andrey V. Elsukov <ae@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *

--- 389 unchanged lines hidden (view full) ---

398 continue;
399 me_set_running(sc);
400 }
401}
402
403static int
404me_set_tunnel(struct me_softc *sc, in_addr_t src, in_addr_t dst)
405{
406 struct epoch_tracker et;
406 struct me_softc *tmp;
407
408 sx_assert(&me_ioctl_sx, SA_XLOCKED);
409
410 if (V_me_hashtbl == NULL) {
411 V_me_hashtbl = me_hashinit();
412 V_me_srchashtbl = me_hashinit();
413 }

--- 10 unchanged lines hidden (view full) ---

424 }
425
426 me_delete_tunnel(sc);
427 sc->me_dst.s_addr = dst;
428 sc->me_src.s_addr = src;
429 CK_LIST_INSERT_HEAD(&ME_HASH(src, dst), sc, chain);
430 CK_LIST_INSERT_HEAD(&ME_SRCHASH(src), sc, srchash);
431
407 struct me_softc *tmp;
408
409 sx_assert(&me_ioctl_sx, SA_XLOCKED);
410
411 if (V_me_hashtbl == NULL) {
412 V_me_hashtbl = me_hashinit();
413 V_me_srchashtbl = me_hashinit();
414 }

--- 10 unchanged lines hidden (view full) ---

425 }
426
427 me_delete_tunnel(sc);
428 sc->me_dst.s_addr = dst;
429 sc->me_src.s_addr = src;
430 CK_LIST_INSERT_HEAD(&ME_HASH(src, dst), sc, chain);
431 CK_LIST_INSERT_HEAD(&ME_SRCHASH(src), sc, srchash);
432
433 NET_EPOCH_ENTER(et);
432 me_set_running(sc);
434 me_set_running(sc);
435 NET_EPOCH_EXIT(et);
433 if_link_state_change(ME2IFP(sc), LINK_STATE_UP);
434 return (0);
435}
436
437static void
438me_delete_tunnel(struct me_softc *sc)
439{
440

--- 246 unchanged lines hidden ---
436 if_link_state_change(ME2IFP(sc), LINK_STATE_UP);
437 return (0);
438}
439
440static void
441me_delete_tunnel(struct me_softc *sc)
442{
443

--- 246 unchanged lines hidden ---