<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>

<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">

<p class="details" style="font-style: italic; color: #737278;">
<a href="https://gitlab.rtems.org/tracmigrate">Trac Migrate</a> created an issue: <a href="https://gitlab.rtems.org/rtems/pkg/rtems-net-legacy/-/issues/14">#14</a>
</p>
<p>
Assignee: Trac Migrate
</p>
<div class="md" style="position: relative; z-index: 1; color: #28272d; word-wrap: break-word;">
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">Original author: timcussins</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">The dhcp code in rtems uses an unchanging transaction id (xid) in the dhcp discover and request packets.</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">It is possible (and in fact has been observed) that dhcp servers may issue multiple OFFER packets in response to multiple REQUEST packets from the same device.</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">The second OFFER packet could potentially be received while the dhcp state machine is waiting for an ACK packet - and this would cause the rtems dhcp process to fail needlessly.</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">A solution to this is to use the transaction id field (described in the bootp/dhcp protocols) to match server dhcp replies with rtems dhcp requests.</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">For details on the use of xid, see RFC 2131, Section 4.4.1 (<a href="http://www.networksorcery.com/enp/rfc/rfc2131.txt" rel="nofollow noreferrer noopener" target="_blank" style="margin-top: 0;">http://www.networksorcery.com/enp/rfc/rfc2131.txt</a>)</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">The patch creates a unique xid for each dhcp transaction: the DISCOVER/OFFER and REQUEST/ACK phases use different xid's, there is no confusion in the rtems state machine.</p>
<ul dir="auto" style="text-align: initial; list-style-type: disc; margin: 0; padding: 0;">
<li style="margin-top: 0; line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><a href="https://gitlab.rtems.org/rtems/pkg/rtems-net-legacy/-/blob/main/assets/tracmigration/ticket_attachments/0001-libnetworking-rtems_dhcp.c-Fix-invariant-DHCP-transa.patch" class="gfm" style="margin-top: 0;">0001-libnetworking-rtems_dhcp.c-Fix-invariant-DHCP-transa.patch</a></li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><a href="https://gitlab.rtems.org/rtems/pkg/rtems-net-legacy/-/blob/main/assets/tracmigration/ticket_attachments/dhcp-unique-xid.diff" class="gfm" style="margin-top: 0;">dhcp-unique-xid.diff</a></li>
</ul>
</div>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #737278;">

<br>
<a href="https://gitlab.rtems.org/rtems/pkg/rtems-net-legacy/-/issues/14">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/sent_notifications/c9093185b11f700525ef66f1cbfd8e8a/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.rtems.org/rtems/pkg/rtems-net-legacy/-/issues/14"}}</script>


</p>
</div>
</body>
</html>