Lines Matching refs:ipsec
467 struct bond_ipsec *ipsec; in bond_ipsec_add_sa() local
494 ipsec = kmalloc(sizeof(*ipsec), GFP_KERNEL); in bond_ipsec_add_sa()
495 if (!ipsec) { in bond_ipsec_add_sa()
503 ipsec->xs = xs; in bond_ipsec_add_sa()
504 INIT_LIST_HEAD(&ipsec->list); in bond_ipsec_add_sa()
506 list_add(&ipsec->list, &bond->ipsec_list); in bond_ipsec_add_sa()
509 kfree(ipsec); in bond_ipsec_add_sa()
520 struct bond_ipsec *ipsec; in bond_ipsec_add_sa_all() local
539 list_for_each_entry(ipsec, &bond->ipsec_list, list) { in bond_ipsec_add_sa_all()
541 if (ipsec->xs->xso.real_dev == real_dev) in bond_ipsec_add_sa_all()
544 ipsec->xs->xso.real_dev = real_dev; in bond_ipsec_add_sa_all()
545 if (real_dev->xfrmdev_ops->xdo_dev_state_add(ipsec->xs, NULL)) { in bond_ipsec_add_sa_all()
547 ipsec->xs->xso.real_dev = NULL; in bond_ipsec_add_sa_all()
563 struct bond_ipsec *ipsec; in bond_ipsec_del_sa() local
596 list_for_each_entry(ipsec, &bond->ipsec_list, list) { in bond_ipsec_del_sa()
597 if (ipsec->xs == xs) { in bond_ipsec_del_sa()
598 list_del(&ipsec->list); in bond_ipsec_del_sa()
599 kfree(ipsec); in bond_ipsec_del_sa()
610 struct bond_ipsec *ipsec; in bond_ipsec_del_sa_all() local
619 list_for_each_entry(ipsec, &bond->ipsec_list, list) { in bond_ipsec_del_sa_all()
620 if (!ipsec->xs->xso.real_dev) in bond_ipsec_del_sa_all()
630 real_dev->xfrmdev_ops->xdo_dev_state_delete(ipsec->xs); in bond_ipsec_del_sa_all()
632 real_dev->xfrmdev_ops->xdo_dev_state_free(ipsec->xs); in bond_ipsec_del_sa_all()