The code is roughly:

  for st in all states do:
    if ((IS_CHILD_SA(nfo_st) &&
        (st->st_serialno == nfo_st->st_clonedfrom ||
         st->st_clonedfrom == nfo_st->st_clonedfrom)) ||
        st->st_serialno == nfo_st->st_serialno) {
            do stuff
    }

if I transform the if() I get:

    if ((IS_CHILD_SA(nfo_st) && st->st_serialno == nfo_st->st_clonedfrom) ||
        (IS_CHILD_SA(nfo_st) && st->st_clonedfrom == nfo_st->st_clonedfrom) ||
        st->st_serialno == nfo_st->st_serialno)

which makes me suspect it is looking for:

- nfo_st's IKE SA
- nfo_st's siblings
- and of course nfo_st

or in other words it wants to 'do stuff' on ST's entire family?  I
guess that makes sense, just not very efficient.

Andrew
_______________________________________________
Swan-dev mailing list
[email protected]
https://lists.libreswan.org/mailman/listinfo/swan-dev

Reply via email to