Skip to content

Commit cc4ac39

Browse files
adamroachdcreager
authored andcommitted
Fixed example IP addresses to conform to RFC 5737 (#92)
1 parent f04c575 commit cc4ac39

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

index.html

+16-16
Original file line numberDiff line numberDiff line change
@@ -1332,8 +1332,8 @@ <h2>Origins with multiple IP addresses</h2>
13321332
As an example, assume that <code>example.com</code> is handled by three
13331333
<a>servers</a>, each with a different IP address. The owner of the
13341334
service configures DNS to resolve <code>example.com</code> to
1335-
<code>192.168.0.1</code>, <code>192.168.0.2</code>, and
1336-
<code>192.168.0.3</code>, and relies on user agents to balance their
1335+
<code>192.0.2.1</code>, <code>192.0.2.2</code>, and
1336+
<code>192.0.2.3</code>, and relies on user agents to balance their
13371337
requests across these three IP addresses. The service owner delivers
13381338
the following <a>NEL policy</a>:
13391339
</p>
@@ -1357,11 +1357,11 @@ <h2>Origins with multiple IP addresses</h2>
13571357
<ol>
13581358
<li>
13591359
<p>
1360-
The user agent sends a <a>request</a> to <code>192.168.0.1</code>,
1360+
The user agent sends a <a>request</a> to <code>192.0.2.1</code>,
13611361
and receives a successful <a>response</a> from the <a>server</a>.
13621362
This response includes the above <a>NEL policy</a>, and the user
13631363
agent sets the policy's <a>received IP address</a> to
1364-
<code>192.168.0.1</code>. Since the <a>received IP address</a>
1364+
<code>192.0.2.1</code>. Since the <a>received IP address</a>
13651365
matches the <a>server</a>'s IP address (which it must for any
13661366
successful request), it generates the following NEL report:
13671367
</p>
@@ -1373,7 +1373,7 @@ <h2>Origins with multiple IP addresses</h2>
13731373
"url": "https://example.com/",
13741374
"body": {
13751375
"sampling_fraction": 1.0,
1376-
"server_ip": "192.168.0.1",
1376+
"server_ip": "192.0.2.1",
13771377
"protocol": "http/1.1",
13781378
"method": "GET",
13791379
"status_code": 200,
@@ -1387,10 +1387,10 @@ <h2>Origins with multiple IP addresses</h2>
13871387
<li>
13881388
<p>
13891389
The user agent sends a new <a>request</a> to
1390-
<code>192.168.0.2</code>, and receives another successful
1390+
<code>192.0.2.2</code>, and receives another successful
13911391
<a>response</a>. This response also includes the <a>NEL policy</a>,
13921392
and the user agent updates the policy's <a>received IP address</a>
1393-
to <code>192.168.0.2</code>. Since the <a>received IP address</a>
1393+
to <code>192.0.2.2</code>. Since the <a>received IP address</a>
13941394
matches the <a>server</a>'s IP address (which it must for any
13951395
successful request), it generates the following NEL report:
13961396
</p>
@@ -1402,7 +1402,7 @@ <h2>Origins with multiple IP addresses</h2>
14021402
"url": "https://example.com/",
14031403
"body": {
14041404
"sampling_fraction": 1.0,
1405-
"server_ip": "192.168.0.2",
1405+
"server_ip": "192.0.2.2",
14061406
"protocol": "http/1.1",
14071407
"method": "GET",
14081408
"status_code": 200,
@@ -1416,14 +1416,14 @@ <h2>Origins with multiple IP addresses</h2>
14161416
<li>
14171417
<p>
14181418
The user agent then tries to send a <a>request</a> to
1419-
<code>192.168.0.3</code>, but isn't able to establish a connection
1419+
<code>192.0.2.3</code>, but isn't able to establish a connection
14201420
to the server. The user agent still has the <a>NEL policy</a> in
14211421
the <a>policy cache</a>, and would ideally use this policy to
14221422
generate a <code>tcp.timed_out</code> report about the <a>failed</a>
14231423
<a>network request</a>. However, the because policy's <a>received
1424-
IP address</a> (<code>192.168.0.2</code>) doesn't match the IP
1424+
IP address</a> (<code>192.0.2.2</code>) doesn't match the IP
14251425
address that this <a>request</a> was sent to, the user agent cannot
1426-
verify that the server at <code>192.168.0.3</code> is actually owned
1426+
verify that the server at <code>192.0.2.3</code> is actually owned
14271427
by the owners of <code>example.com</code>. The user agent must
14281428
therefore downgrade the report to <code>dns.address_changed</code>:
14291429
</p>
@@ -1435,7 +1435,7 @@ <h2>Origins with multiple IP addresses</h2>
14351435
"url": "https://example.com/",
14361436
"body": {
14371437
"sampling_fraction": 1.0,
1438-
"server_ip": "192.168.0.3",
1438+
"server_ip": "192.0.2.3",
14391439
"protocol": "http/1.1",
14401440
"method": "GET",
14411441
"status_code": 0,
@@ -1449,12 +1449,12 @@ <h2>Origins with multiple IP addresses</h2>
14491449
<li>
14501450
<p>
14511451
The user agent then tries to send another <a>request</a> to
1452-
<code>192.168.0.1</code>, but once again isn't able to establish a
1452+
<code>192.0.2.1</code>, but once again isn't able to establish a
14531453
connection to the server. Even though the user agent received the
1454-
<a>NEL policy</a> from <code>192.168.0.1</code> at some point in the
1454+
<a>NEL policy</a> from <code>192.0.2.1</code> at some point in the
14551455
past, the policy's <a>received IP address</a> only records where it
14561456
was <em>most recently</em> received from — in this case,
1457-
<code>192.168.0.2</code>. The user agent must therefore downgrade
1457+
<code>192.0.2.2</code>. The user agent must therefore downgrade
14581458
the report to <code>dns.address_changed</code>:
14591459
</p>
14601460

@@ -1465,7 +1465,7 @@ <h2>Origins with multiple IP addresses</h2>
14651465
"url": "https://example.com/",
14661466
"body": {
14671467
"sampling_fraction": 1.0,
1468-
"server_ip": "192.168.0.1",
1468+
"server_ip": "192.0.2.1",
14691469
"protocol": "http/1.1",
14701470
"method": "GET",
14711471
"status_code": 0,

0 commit comments

Comments
 (0)