Skip to content

Commit 7be7d55

Browse files
committed
Add --force_asymmetric option to switch NAT compensation logic off
for all sessions unconditionally. Prompted by: [email protected]
1 parent f18630d commit 7be7d55

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

doc/manpage.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@
150150

151151
<arg choice="opt"><option>-W</option>
152152
<replaceable>setup_ttl</replaceable></arg>
153+
154+
<arg choice="opt"><option>--force_asymmetric</option></arg>
153155
</cmdsynopsis>
154156
</refsynopsisdiv>
155157

@@ -589,6 +591,15 @@
589591
- WARN and facility is LOG_DAEMON.</para>
590592
</listitem>
591593
</varlistentry>
594+
595+
<varlistentry>
596+
<term><option>--force_asymmetric</option></term>
597+
598+
<listitem>
599+
<para>Treat all RTP/RTCP sessions as "assymetric", i.e. disable any NAT
600+
traversal features unconditionally.</para>
601+
</listitem>
602+
</varlistentry>
592603
</variablelist>
593604
</refsect1>
594605

src/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,15 @@ rtpp_rlim_max(const struct rtpp_cfg *cfsp)
224224
#define LOPT_NICE 258
225225
#define LOPT_OVL_PROT 259
226226
#define LOPT_CONFIG 260
227+
#define LOPT_FORC_ASM 261
227228

228229
const static struct option longopts[] = {
229230
{ "dso", required_argument, NULL, LOPT_DSO },
230231
{ "bridge_symmetric", no_argument, NULL, LOPT_BRSYM },
231232
{ "nice", required_argument, NULL, LOPT_NICE },
232233
{ "overload_prot", optional_argument, NULL, LOPT_OVL_PROT },
233234
{ "config", required_argument, NULL, LOPT_CONFIG },
235+
{ "force_asymmetric", no_argument, NULL, LOPT_FORC_ASM },
234236
{ NULL, 0, NULL, 0 }
235237
};
236238

@@ -382,6 +384,10 @@ init_config(struct rtpp_cfg *cfsp, int argc, char **argv)
382384
cfsp->cfile = optarg;
383385
break;
384386

387+
case LOPT_FORC_ASM:
388+
cfsp->aforce = 1;
389+
break;
390+
385391
case 'c':
386392
if (strcmp(optarg, "fifo") == 0) {
387393
cfsp->sched_policy = SCHED_FIFO;

0 commit comments

Comments
 (0)