<PAGE>

                                                                    EXHIBIT 10.5

                               SIXTH AMENDMENT TO
                         AMENDED AND RESTATED REVOLVING
                          CREDIT AND SECURITY AGREEMENT

         THIS SIXTH AMENDMENT TO AMENDED AND RESTATED REVOLVING CREDIT AND
SECURITY AGREEMENT ("AMENDMENT") is made and entered into as of December 31,
2003 by and among AVANEX CORPORATION, a Delaware corporation ("BORROWER") and
COMERICA BANK, successor by merger to Comerica Bank-California ("BANK").

                                    RECITALS

         A.       Borrower and Bank have entered into that certain Amended and
Restated Revolving Credit and Security Agreement dated as of July 10, 2000, as
amended from time to time including, without limitation, by that certain First
Amendment to Amended and Restated Revolving Credit and Security Agreement dated
as of August 24, 2000, that certain Second Amendment to Amended and Restated
Revolving Credit and Security Agreement and Agreement Regarding Term Loan dated
as of January 2, 2001, that certain Third Amendment to Amended and Restated
Revolving Credit and Security Agreement dated as of July 19, 2001, that certain
Fourth Amendment to Amended and Restated Revolving Credit and Security Agreement
dated as of September 26, 2002, and that certain Fifth Amendment to Amended and
Restated Revolving Credit and Security Agreement dated as of June 18, 2003
(collectively, the "LOAN AGREEMENT") pursuant to which Bank has agreed to extend
and make available to Borrower a certain credit facility.

         B.       Borrower desires that Bank amend the Loan Agreement upon the
terms and conditions more fully set forth herein.

         C.       Subject to the representations and warranties of Borrower
herein and upon the terms and conditions set forth in this Amendment, Bank is
willing to so amend the Loan Agreement.

         D.       This Amendment, the Loan Agreement and the other Loan
Documents (as defined in the Loan Agreement), together with all other documents
entered into or delivered pursuant to any of the foregoing, in each case as
originally executed or as the same may from time to time be modified, amended,
supplemented, restated or superseded are hereinafter collectively referred to as
the "LOAN DOCUMENTS."

                                    AGREEMENT

         NOW, THEREFORE, in consideration of the foregoing recitals and the
mutual covenants herein set forth and for other good and valuable consideration,
the receipt and sufficiency of which are hereby acknowledged, and intending to
be legally bound, Borrower and Bank hereby agree to amend the Loan Agreement as
follows:

<PAGE>

                  1.       DEFINITIONS. Unless otherwise defined herein, all
terms defined in the Loan Agreement have the same meaning when used herein.

                  2.       AMENDMENTS TO LOAN AGREEMENT. The Loan Agreement is
hereby amended as follows:

                           a.       The defined term "Committed Line" set forth
in Section 1.1 of the Loan Agreement is hereby amended and replaced in its
entirety to read as follows:

         "`Committed Line' means Twenty Million Dollars ($20,000,000)."

                           b.       The date "December 31, 2003" set forth in
the defined term "Termination Date" in Section 1.1 of the Loan Agreement is
hereby replaced and amended in its entirety to read "December 31, 2004".

                           c.       Section 2.4 of the Loan Agreement is hereby
amended and replaced in its entirety to read as follows:

         "2.4 Interest. Borrower shall pay interest to Bank on the outstanding
and unpaid principal amount of the Revolving Credit at the floating rate per
annum equal to one and one-quarter percent (1.25%) above the Prime Rate."

                           d.       Section 8.5 of the Loan Agreement is hereby
amended as follows: (i) the amount "Fifteen Million Dollars ($15,000,000)" is
deleted from the first sentence and "Twenty Million Dollars ($20,000,000)" is
substituted therefor; (ii) the following new sentence is hereby inserted in
between the existing second and third sentences: "Borrower shall not at any time
transfer any funds from its account to the Restricted Account."; and (iii) the
last sentence is amended and restated in its entirety to read as follows:
"`Unrestricted Cash' as used herein means domestic cash and cash equivalents,
plus domestic short-term investments, plus domestic long-term investments
(including long-term investments at Munder Capital), minus trade accounts
payable, and minus the current portion of restructuring charges."

                           e.       The Compliance Certificate attached as
Exhibit C to the Loan Agreement is hereby amended consistent with the foregoing.

                  3.       RATIFICATION AND REAFFIRMATION OF LIENS. Borrower
hereby ratifies and reaffirms the validity and enforceability of all of the
liens and security interests heretofore granted pursuant to the Loan Documents,
as collateral security for the Obligations, and acknowledges that all of such
liens and security interests, and all Collateral heretofore pledged as security
for the Obligations, continues to be and remains Collateral for the Obligations
from and after the date hereof.

                  4.       REPRESENTATIONS AND WARRANTIES. Borrower represents
and warrants that its representations and warranties in the Loan Documents
continue to be true and complete in all material respects as of the date hereof
after giving effect to this Amendment (except to the extent such specifically
relate to another date) and that the execution, delivery and performance of this
Amendment are duly authorized, do not require the consent or approval of any
governmental body or regulatory authority and are not in contravention of or in
conflict with any

<PAGE>

law or regulation or any term or provision of any other agreement entered into
by Borrower. Borrower further represents and warrants that, as of the date
hereof after giving effect to this Amendment, no Event of Default has occurred
and is continuing.

                  5.       FULL FORCE AND EFFECT; ENTIRE AGREEMENT. Except to
the extent expressly provided in this Amendment, the terms and conditions of the
Loan Agreement and the other Loan Documents shall remain in full force and
effect. This Amendment and the other Loan Documents constitute and contain the
entire agreement of the parties hereto and supersede any and all prior
agreements, negotiations, correspondence, understandings and communications
between the parties, whether written or oral, respecting the subject matter
hereof. The parties hereto further agree that the Loan Documents comprise the
entire agreement of the parties thereto and supersede any and all prior
agreements, negotiations, correspondence, understandings and other
communications between the parties thereto, whether written or oral respecting
the extension of credit by Bank to Borrower and/or its affiliates. Except as
expressly set forth herein, the execution, delivery and performance of this
Amendment shall not operate as a waiver of, or as an amendment of, any right,
power or remedy of Bank under the Loan Agreement or any other Loan Document as
in effect prior to the date hereof.

                  6.       COUNTERPARTS; EFFECTIVENESS. This Amendment may be
executed in any number of counterparts, each of which when so delivered shall be
deemed an original, but all such counterparts taken together shall constitute
but one and the same instrument. This Amendment is effective as of the date
first above written; provided that, as a condition to the effectiveness of this
Amendment, Bank shall have received, in form and substance satisfactory to Bank,
the following:

                           (a)      this Amendment, duly executed by Borrower;

                           (b)      Corporate Resolutions to Borrow in
substantially the form attached hereto as EXHIBIT A;

                           (c)      an amount equal to the Bank Expenses
incurred in connection with this Amendment plus an amount equal to $6,562.50,
representing the pro-rated portion of the 0.25% commitment fee on the increased
$5,000,000 commitment amount for the period from the date of this Amendment to
the next anniversary of the Closing Date;

                           (d)      evidence that Borrower has transferred
$5,000,000 from its Morgan Stanley account to the Restricted Account; and

                           (e)      such other documents, and completion of such
other matters, as Bank may reasonably deem necessary or appropriate.

                           [signature page to follow]

<PAGE>

         IN WITNESS WHEREOF, each of the parties hereto has caused this
Amendment to be executed and delivered by its duly authorized officer as of the
date first written above.

                                           BORROWER:

                                           AVANEX CORPORATION

                                           By: /s/ WALTER ALESSANDRINI
                                           Its: President and CEO

                                           BANK:

                                           COMERICA BANK

                                           By: /s/
                                           Its:

<PAGE>

                                                                       Exhibit A

                         CORPORATE RESOLUTIONS TO BORROW

         BORROWER:         AVANEX CORPORATION

         I, the undersigned Secretary or Assistant Secretary of AVANEX
CORPORATION (the "Corporation"), HEREBY CERTIFY that the Corporation is
organized and existing under and by virtue of the laws of Delaware.

         I FURTHER CERTIFY that at a meeting of the Directors of the Corporation
duly called and held, at which a quorum was present and voting, (or by other
duly authorized corporate action in lieu of a meeting), the following
resolutions were adopted.

         BE IT RESOLVED, that ANY ONE (1) of the following named officers,
employees, or agents of this Corporation, whose actual signatures are shown
below:

<TABLE>
<CAPTION>
     NAME                       POSITION               ACTUAL SIGNATURE
     ----                       --------               ----------------
<S>                        <C>                        <C>
__________________         __________________         ___________________

__________________         __________________         ___________________
</TABLE>

acting for and on behalf of this Corporation and as its act and deed be, and
they hereby are, authorized and empowered:

         BORROW MONEY. To borrow from time to time from COMERICA BANK ("Bank"),
on such terms as may be agreed upon between the officers, employees or agents of
the Corporation and Bank, such sum or sums of money as in their judgment should
be borrowed, without limitation.

         EXECUTE LOAN DOCUMENTS. To execute and deliver to Bank that certain
Sixth Amendment to Amended and Restated Revolving Credit and Security Agreement
dated as of December 31, 2003 (the "Amendment") and any other documents related
to the Amendment or to that certain Amended and Restated Revolving Credit and
Security Agreement dated as of July 10, 2000 entered into between the
Corporation and Bank, as amended (collectively with the Amendment, the "Loan
Documents"), and also to execute and deliver to Bank one or more amendments,
renewals, extensions, modifications, refinancings, consolidations or
substitutions for the Loan Documents or any portion thereof.

         GRANT SECURITY. To grant a security interest to Bank in the Collateral
described in the Loan Documents, which security interest shall secure all of the
Corporation's Obligations, as described in the Loan Documents.

         LETTERS OF CREDIT. To execute letter of credit applications and other
related documents pertaining to Bank's issuance of letters of credit.

         CREDIT CARD SERVICES. To execute credit card services applications and
other related documents pertaining to Bank's credit card services.

         NEGOTIATE ITEMS. To draw, endorse, and discount with Bank all drafts,
trade acceptances, promissory notes, or other evidences of indebtedness payable
to or belonging to the Corporation or in which the Corporation

<PAGE>

may have an interest, and either to receive cash for the same or to cause such
proceeds to be credited to the account of the Corporation with Bank, or to cause
such other disposition of the proceeds derived therefrom as they may deem
advisable.

         FURTHER ACTS. In the case of lines of credit, to designate additional
or alternate individuals as being authorized to request advances thereunder, and
in all cases, to do and perform such other acts and things, to pay any and all
fees and costs, and to execute and deliver such other documents and agreements
as they may in their discretion deem reasonably necessary or proper in order to
carry into effect the provisions of these Resolutions.

         BE IT FURTHER RESOLVED, that any and all acts authorized pursuant to
these Resolutions and performed prior to the passage of these Resolutions are
hereby ratified and approved, that these Resolutions shall remain in full force
and effect and Bank may rely on these Resolutions until written notice of their
revocation shall have been delivered to and received by Bank. Any such notice
shall not affect any of the Corporation's agreements or commitments in effect at
the time notice is given.

         I FURTHER CERTIFY that the officers, employees, and agents named above
are duly elected, appointed, or employed by or for the Corporation, as the case
may be, and occupy the positions set forth opposite their respective names; that
the foregoing Resolutions now stand of record on the books of the Corporation;
and that the Resolutions are in full force and effect and have not been modified
or revoked in any manner whatsoever.

         I FURTHER CERTIFY that a true and correct copy of the Certificate of
Incorporation of the Corporation, as amended, has been delivered to Bank, as in
full force and effect on the date hereof.

         IN WITNESS WHEREOF, I have hereunto set my hand on _________________,
2004 and attest that the signatures set opposite the names listed above are
genuine signatures.

                                              CERTIFIED TO AND ATTESTED BY:

                                              _______________________________
                                              Title:

<PAGE>

                                    EXHIBIT C
                             COMPLIANCE CERTIFICATE

TO: COMERICA BANK-CALIFORNIA

FROM: AVANEX CORPORATION

         The undersigned authorized officer of AVANEX CORPORATION hereby
certifies that in accordance with the terms and conditions of the Amended and
Restated Revolving Credit and Security Agreement between Borrower and Bank dated
as of July 10, 2000, as amended from time to time (the "Agreement"), (i)
Borrower is in complete compliance for the period ending _______________ with
all required covenants except as noted below and (ii) all representations and
warranties of Borrower stated in the Agreement are true and correct as of the
date hereof. Attached herewith are the required documents supporting the above
certification. The Officer further certifies that these are prepared in
accordance with Generally Accepted Accounting Principles (GAAP) and are
consistently applied from one period to the next except as explained in an
accompanying letter or footnotes.

<TABLE>
<CAPTION>
         REPORTING COVENANT                                          REQUIRED                                 COMPLIES
         ------------------                                          --------                                 --------
<S>                                                           <C>                                           <C>
Quarterly financial statements (10Q)                          Quarterly within 45 days                      Yes        No
Annual (CPA Audited) (10K)                                    FYE within 90 days                            Yes        No
IP Report                                                     Quarterly within 30 days                      Yes        No
Total amount of Borrower's cash and investments               Amount:  $________                            Yes        No
Total amount of Borrower's cash and investments               Amount:  $________                            Yes        No
maintained with Bank
</TABLE>

<TABLE>
<CAPTION>
FINANCIAL COVENANT                                             REQUIRED                        ACTUAL         COMPLIES
------------------                                             --------                        ------         --------
<S>                                                           <C>                             <C>           <C>
Maintain on a quarterly basis:
     Minimum Tangible Net Worth                               $70,000,000                     $________     Yes        No
Maintain at all times:
     Minimum Unrestricted  Domestic Cash (as defined in       $50,000,000                     $________     Yes        No
     Section 8.5) (the "Minimum Cash Balance")
     Minimum Cash Balance maintained with Bank or             $20,000,000                     $________     Yes        No
     Bank's Affiliates (including  Munder Capital) and
     subject to a control agreement
</TABLE>

COMMENTS REGARDING EXCEPTIONS:  See Attached.

                                       BANK USE ONLY

                                       Received by:_____________________________
Sincerely,                                              AUTHORIZED SIGNER

                                       Date:____________________________________

_____________________________          Verified:________________________________
SIGNATURE                                             AUTHORIZED SIGNER

_____________________________          Date:____________________________________
TITLE

                                       Compliance Status         Yes        No
_____________________________
DATE

  PLEASE INDICATE COMPLIANCE STATUS BY CIRCLING YES/NO UNDER "COMPLIES" COLUMN.