Skip to contentSkip to conversation

why does tcpmss_reverse_mtu() in xt_TCPMSS.c call dst_release()

DISCUSSION Giacomo 2 participants 2 messages Mar 2, 2009 netfilter

lore
Share & tools
lore

Giacomo

author
#0 lore raw

Good morning. A simple question this time:

why does tcpmss_reverse_mtu() in xt_TCPMSS.c call dst_release() after dst_mtu()?

I saw that dst_release decrements reference count of the passed struct dst_entry*.

Is it called because of dst_mtu() or because of ip_route_output_key() ?

thank you.

Signature · 21 lines
Giacomo S.
http://www.giacomos.it

- - - - - - - - - - - - - - - - - - - - - -

* Aprile 2008: iqfire-wall, un progetto
  open source che implementa un
  filtro di pacchetti di rete per Linux,
  e` disponibile per il download qui:
  http://sourceforge.net/projects/ipfire-wall

* Informazioni e pagina web ufficiale:
  http://www.giacomos.it/iqfire/index.html

- - - - - - - - - - - - - - - - - - - - - -

 . ''  `.
:   :'    :
 `.  ` '
    `- Debian GNU/Linux -- The power of freedom
        http://www.debian.org
#1 lore raw
Quoted 6 lines · Giacomo

Good morning. A simple question this time:

why does tcpmss_reverse_mtu() in xt_TCPMSS.c call dst_release() after dst_mtu()?

I saw that dst_release decrements reference count of the passed struct dst_entry*.

A route entry will be created with ai->route(), but since all we want is the MTU, this dst/route is released again so that it will get gc'ed.